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.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
JSON.Equals
Checks if two JSON are equal.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| JSON | 9.0 | Yes | Yes | Yes | Yes | Yes |
Parameters
| Parameter | Description | Example |
|---|---|---|
| json1 | A JSON text or reference. | {"key": "value"} |
| json2 | A JSON text or reference. | {"key": "value"} |
Result
Returns 1, 0 or error.
Description
Checks if two JSON are equal.We compare recursively all nodes.
If structure and values are the same, we return 1, otherwise 0.
Objects do not need to have same order for entries.
Examples
Compare two numbers:
MBS( "JSON.Equals"; 1; 1 )
Example result: 1
Comparing strings:
MBS( "JSON.Equals"; "\"Hello\""; "\"World\"" ) &
MBS( "JSON.Equals"; "\"Hello\""; "\"Hello\"" )
Example result: 01
Comparing booleans:
MBS( "JSON.Equals"; true; true ) &
MBS( "JSON.Equals"; false; false ) &
MBS( "JSON.Equals"; true; false ) &
MBS( "JSON.Equals"; false; true )
Example result: 1100
Compare objects:
MBS( "JSON.Equals"; "{\"key\": \"value\"}"; "{\"key\": \"value\"}") & MBS( "JSON.Equals"; "{\"key\": \"value\"}"; "{\"key\": \"Value\"}")
Example result: 10
See also
Blog Entries
Release notes
- Version 9.0
- Added JSON.CreateValue, JSON.Equals, JSON.FindValueInArray and JSON.FindValueInObjectArray functions.
Created 14th December 2018, last changed 20th February 2020
JSON.EqualContent - JSON.FindValueInArray
Feedback: Report problem or ask question.
Links
MBS FileMaker tutorial videos