List.GetValue
-------------

Queries a value in the list.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [List](component_List.md) | [7.1](newinversion71.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "List.GetValue"; List; Index ) 

**MBS**( **"List.GetValue";** /\* Queries a value in the list. \*/  
**$List**; /\* The list to process.e.g. "Hello" ¶ "" ¶ "World" \*/   
**$Index**) /\* The index of the value to get. Must be in range from 0 to [QuickList.Count](QuickListCount.md)-1. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| List | The list to process. | "Hello" ¶ "" ¶ "World" |
| Index | The index of the value to get. Must be in range from 0 to [QuickList.Count](QuickListCount.md)-1. | $index |

### Result

Returns value or error.

### Description

Queries a value in the list.  
If you enable tracing with Trace command, this function will be much slower due to the debug output.  
### Examples

Get first value:

 MBS ( "List.GetValue"; "Hello¶World"; 0 )  
<small>  
Example result: Hello</small>### See also

- [JSON.GetArrayItemsAsQuickList](JSONGetArrayItemsAsQuickList.md)
- [List.AddValue](ListAddValue.md)
- [List.HasValue](ListHasValue.md)
- [List.IndexOfFirstValueMatching](ListIndexOfFirstValueMatching.md)
- [List.SetValue](ListSetValue.md)
- [QuickList.Count](QuickListCount.md)
- [QuickList.GetValue](QuickListGetValue.md)
- [QuickList.JoinJSON](QuickListJoinJSON.md)

### Release notes

- **Version 7.1**
    - Added [List.AddValue](http://www.mbsplugins.eu/ListAddValue.shtml), [List.GetValue](http://www.mbsplugins.eu/ListGetValue.shtml), [List.InsertValue](http://www.mbsplugins.eu/ListInsertValue.shtml), [List.Remove](http://www.mbsplugins.eu/ListRemove.shtml), [List.RemoveValue](http://www.mbsplugins.eu/ListRemoveValue.shtml) and [List.SetValue](http://www.mbsplugins.eu/ListSetValue.shtml).

This function checks for a license.

Created 11st March 2017 , last changed 15th January 2024

  
[List.GetColumn](ListGetColumn.md) - [List.HasDuplicateItems](ListHasDuplicateItems.md)

[HTML Version](ListGetValue.shtml)