SqlListToArrayList ( ~sql_list, ~column_delimiter )
Converts a List of delimited values to a List of JSON Arrays
Be the first to rate this function Log in to vote
Benedick Miller - Show more from this author |
def,42
xzy,99
["def",42]
["xyz",99]
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Converts a List of delimited values to a List of JSON Arrays
Requires FM 18 or greater with the While Function
Designed to convert the output of an ExecuteSQL() query to a list of JSON arrays
will also work for any other list of delimited values
Sample input:
abc,101
def,42
xzy,99
Sample Output:
["abc",101]
["def",42]
["xyz",99]
By design empty values are set as empty strings in the arrays, not to null,
Number values are saved as numbers, other values are saved as strings.
Input must a be a list.
Column delimiter is "," be default, if not specified. Another delimiter may be specified, but not ¶
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.