I am trying to access a REST web service where the keys have dots in the name. FileMaker interprets a dot in a key name to indicate a sub-element. Is there any way to escape the dot so that FileMaker treats it literally instead of as a separator?
For instance, if I have JSON like this:
{
"value1": "Red",
"value_1": "Green",
"value.1": "Blue"
}
this works: JSONGetElement ( $json ; "value1" )
this works: JSONGetElement ( $json ; "value_1" )
this fails (returns an empty value): JSONGetElement ( $json ; "value.1" )
this also fails (returns an empty value): JSONGetElement ( $json ; "value\.1" )
Ah, you are referring to a 'period'.
NO, can't use periods in names. Also can't use square or curly brackets as they are also reserved characters.
The period is for sub-groups.
"value.1" is the field "1" in the array "value".
From the Example data in the Help.
https://fmhelp.filemaker.com/help/16/fmp/en/#page/FMP_Help%2Fjson-functions.html%23ww1155222 <https://fmhelp.filemaker.com/help/16/fmp/en/#page/FMP_Help/json-functions.html#ww1155222>
"bakery.product.id <http://bakery.product.id/>"
Is the ID field in the Product sub-group in the Bakery array.