Brian Dunning's FileMaker Custom Functions

JSON.MakeArrayObject ( ValueList ; Separator )

Simple function that wraps a list of values in an array object.

  Be the first to rate this function Log in to vote

Jonni™   Jonni™ - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
JSON.MakeArrayObject ( List ( 1;2;3;4;5 ) ; "¶" )
  Sample output:
[1,2,3,4,5] or ["a","b","c","d","e"]

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

Simple function that wraps a list of values in an array object to be used within an array object in a JSON notation.

JSONSetElement ( "{}" ; "myArray" ; JSON.MakeArrayObject ( List ( 1;2;3;4;5 ) ; "¶" ) ; JSONArray )

or

JSONSetElement ( "{}" ; "myArray" ; JSON.MakeArrayObject ( List ( "a";"b";"c";"d";"e" ) ; "¶" ) ; JSONArray )

 

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: