| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
JSON.Flatten
Flattens a json object or array to a single depth object of key-value pairs.
| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
| JSON | 13.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "JSON.Flatten"; JSON ) More
Parameters
| Parameter | Description | Example |
|---|---|---|
| JSON | A JSON text or reference. |
Result
Returns JSON or error.
Description
Flattens a json object or array to a single depth object of key-value pairs.The keys in the flattened object are normalized json paths. The values are primitive (string, number, boolean, or null), empty object ({}) or empty array ([]).
Examples
Try it:
MBS( "JSON.Flatten"; "{\"test\": 123}" )
Example result:
{ "$['test']": 123 }
Example result:
{ "$['test']": 123 }
See also
Blog Entries
This function checks for a license.
Created 18th September 2023, last changed 18th September 2023