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:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
Filters JSON object array to find matching entries.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
JSON | 13.3 | ✅ 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 JSON or error.
Try it:
MBS( "JSON.FilterObjectArray"; "[{\"test\":12}, {\"test\":123}]"; "test"; 123 )
Example result:
[
{
"test": 123
}
]
Try with string:
MBS( "JSON.FilterObjectArray";
"[ {\"test\":\"abc\", \"ID\": 1}, {\"test\":\"Hello\", \"ID\": 2} ]";
"test"; "\"Hello\"" )
Example result:
[
{
"test": "Hello",
"ID": 2
}
]
This function checks for a license.
Created 26th May 2023, last changed 18th July 2023