Brian Dunning's FileMaker Custom Functions

JSONArrayAppendList ( json ; path ; appendList ; jsonType )

Appends a list of values onto a JSON Array. Maintains existing null values

  Average rating: 5.0 (1 vote) Log in to vote

Paul   Paul - Show more from this author
Peak 14 LLC
http://www.peak14.solutions

Share on Facebook Share on Twitter

  Sample input:
JSONArrayAppendList ( "" ; "" ; "item1¶item2" ; JSONString )
JSONArrayAppendList ( "[\"item3\"]" ; "" ; "item1¶item2" ; JSONString )
  Sample output:
["item1","item2"]
["item3","item1","item2"]

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

This has a dependency: JSONGetElementType: https://www.briandunning.com/cf/2287 (removed @ from start of CF name)

Requires FM 18+ for use of While() function. Comment if you need a version that uses recursion. I have one built, but I don't maintain it like this one and it isn't as robust.

 

Comments

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 20 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: