MetaDataQuery.ResultAtIndex
---------------------------

Queries an item from result as JSON.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [MetaDataQuery](component_MetaDataQuery.md) | [8.0](newinversion80.md) | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ✅ Yes |

MBS( "MetaDataQuery.ResultAtIndex"; Query; Index ) 

**MBS**( **"MetaDataQuery.ResultAtIndex";** /\* Queries an item from result as JSON. \*/  
**$Query**; /\* The reference number of the query. \*/   
**$Index**) /\* The index of the item.  
Range from 0 to [MetaDataQuery.ResultCount](MetaDataQueryResultCount.md)-1.e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Query | The reference number of the query. | $query |
| Index | The index of the item.   Range from 0 to [MetaDataQuery.ResultCount](MetaDataQueryResultCount.md)-1. | 0 |

### Result

Returns JSON or error.

### Description

Queries an item from result as JSON.  
### See also

- [MetaDataQuery.PathAtIndex](MetaDataQueryPathAtIndex.md)
- [MetaDataQuery.ResultCount](MetaDataQueryResultCount.md)

### Release notes

- **Version 10.2**
    - Fixed problem with returning data in [MetaDataQuery.ResultAtIndex](https://www.mbsplugins.eu/MetaDataQueryResultAtIndex.shtml) function.

### Example Databases

- [Mac only/MetaDataQuery/Search Applications](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20only/MetaDataQuery/Search%20Applications.shtml#1ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 10.2pr8](https://www.mbsplugins.de/archive/2020-05-09/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [Spotlight search in FileMaker with MBS Plugin](https://www.mbsplugins.de/archive/2017-12-16/Spotlight_search_in_FileMaker_/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 16th December 2017 , last changed 9th November 2021

  
[MetaDataQuery.QueryString](MetaDataQueryQueryString.md) - [MetaDataQuery.ResultCount](MetaDataQueryResultCount.md)

[HTML Version](MetaDataQueryResultAtIndex.shtml)