Brian Dunning's FileMaker Custom Functions

JSONCreateVarsFromKeys ( json ; namespace )

Create local variables for all keys belonging to the JSON document's root node.

  Average rating: 2.5 (2 votes) Log in to vote

Mislav Kos   Mislav Kos
Soliant Consulting
https://www.soliantconsulting.com/

Share on Facebook Share on Twitter

  Sample input:
JSONCreateVarsFromKeys ( $json ; "myVars" )
  Sample output:
0

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Create local variables for all keys belonging to the JSON document's root node.
For example, this custom function will create $id and $color variables given the following JSON: { "id" : "123", "color" : "blue" }

 

Comments

Eric   Eric, SJSU
Feb 23, 2018
Why did someone only give this 1 star?
It seems to be working for me.
The only downside I see is that it makes the variable name initializations more obscure in the script, but that's what comments are for.
 

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.