FMListToJSONArray ( key ; fmList )
Translate a FileMaker list into a proper JSON Array without recursion.
Average rating: 4.4 (5 votes) Log in to vote
Michael Twisdale - Show more from this author |
FMListToJSONArray ( "" ; "" )
FMListToJSONArray ( "car" ; "¶Ford¶¶BMW¶" )
[""]
{"car":["","Ford","","BMW",""]}
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
For more see GitHub - twisdale/FMListToJSONArray: Translate a FileMaker list into a proper JSON Array .
Look at the Readme file.
Comments
Lewis Lorenz, Lorenz Companies Jul 21, 2021 |
||
This is a great function. I ran into an issue where it does not produce valid JSON if a quotation mark (") is in a FM valuelist element. I tried using Quote on the valuelist and escaping the quote without success. Can you help with a solution? Thank you. |
||
Jason Lecureux Aug 27, 2024 |
||
Forgive my ignorance but what use cases does this cover as opposed to something simpler like: Let ( [ fmList = "[\"" & Substitute ( fmList; ¶ ; "\",\"" ) & "\"]" ;obj = JSONSetElement ( ""; "key"; fmList; "" ) ]; obj ) |
||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.