util.JSONArray.toFGL() fills a DYNAMIC ARRAY with the elements of the JSON array.
Syntax
CALL util.JSONArray.toFGL(destination)
Parameters
destination |
a DYNAMIC ARRAY variable that will be filled with the elements of the JSON array |
Usage and examples
util.JSONArray.fromFGL() populates the DYNAMIC ARRAY passed as a parameter with the values included in the JSON array.
destination array must have the same structure as the source JSON array.
MAIN
DEFINE json_arr util.JSONArray
DEFINE da DYNAMIC ARRAY OF STRING
LET json_arr=util.JSONArray.parse('["aa","bb","cc"]')
CALL json_arr.toFGL(da)
DISPLAY da
CALL fgl_getkey()
END MAIN
More details about how JSON strings are converted into fgl data types are here.