FmListToArray ( ~list )
Converts a FileMaker List to a JSON Array
Be the first to rate this function Log in to vote
Benedick Miller - Show more from this author |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Converts a FileMaker List to a JSON Array
Requires FM 18 or greater with the While Function
By design empty values are set as empty strings in the array, not to null,
this makes the array easy to convert back to a FileMaker list.
If you need to deal with trailing carrige returns, or empty values, clean the list before using this function.
The list may be a list of JSON Objects or JSON Arrays.
Number values are saved as numbers, other values are saved as strings.
Sample input:
"abc¶237¶d8f¶¶"
Sample Output:
["abc",237,"d8f",""]
Recursive: the custom function is not recursive, the while function is recursive
Dependencies: none
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.