Reference > Functions reference > Text functions > JSONFormatElements
 

JSONFormatElements

Formats elements in JSON data to make them easier to read.

Format 

JSONFormatElements(json)

Parameters 

json - any text expression or field that contains a JSON object or array.

Data type returned 

text

Originated in 

FileMaker Pro 16.0

Description 

This function parses the text in the json parameter. If json can't be parsed, this function returns "?" followed by an error message (see Handling errors in JSON data). Otherwise, this function returns json with tab and line ending characters added.

Notes 

This function is not supported in runtime solutions and returns "?".

Example 1 

JSONFormatElements ( "{ \"a\" : { \"lnk\" : false, \"id\" : 12 } }" ) returns

{
"a" :
{
"id" : 12,
"lnk" : false
}
}

Related topics 

Functions reference (category list)

Functions reference (alphabetical list)

About formulas

About functions

Defining calculation fields

Using operators in formulas

Working with the JSON functions