Brian Dunning's FileMaker Custom Functions

JSONarrayValueListConvert ( arrayOrList )

Converts line break separated value list into JSON array or vice versa.

  Be the first to rate this function Log in to vote

Robert Koszegi   Robert Koszegi - Show more from this author
The Media Concierge
http://themediaconcierge.com

Share on Facebook Share on Twitter

  Sample input:
1. JSONarrayValueListConverter ( $list )
2. JSONarrayValueListConverter ( "[ \"a\", \"b\", \"c\" ]")
  Sample output:
1. [ "a", "b", "c" ]
2. a¶b¶c

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

PURPOSE:
Convert value list into a simple JSON array and vice versa. Useful for passing multiple value lists in JSON as a script parameter, and using the same function to return the array to a value list in the subscript.

NOTE:
This is just for the array portion of a JSON object. Key and other parts of the object has to be handled outside of this.

 

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