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: 3.5 (4 votes) Log in to vote

Mislav Kos   Mislav Kos - Show more from this author
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.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 15 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: