Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.5
10.0
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
Statistic
FMM
Blog
Queries index of value in object array.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
JSON | 9.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
json | A JSON text or reference. | "[{\"key\": 1}]" | |
Label | The label for the value in the object to compare. | "key" | |
find | A JSON text or reference to find. | 1 | |
byContent | Compare JSON by content, so number can be found via text. Default is 0, so type counts first. |
1 | Optional |
Returns index or error.
Find item:
MBS( "JSON.FindValueInObjectArray"; "[{\"key\": 1}]"; "key"; 1 )
Example result: 0
Find text:
MBS( "JSON.FindValueInObjectArray"; "[{\"key2\": \"test\"}, {\"key\": 1}]"; "key2"; "\"test\"" )
Created 14th December 2018, last changed 4th February 2021
JSON.FindValueInArray - JSON.Format
Feedback: Report problem or ask question.