JSONToArray

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
JSONToArray(<pJSON>)
Associationsws.goulding.script-library.mergjson
Summary

Parse JSON to a LiveCode array

Parameters
NameTypeDescription
pJSON

A UTF8 encoded JSON string

Example
local tProfile
put url "https://graph.facebook.com/me" into tProfile
if the result begins with "error" then
	-- handle error
else
	put JSONToArray(tProfile) into tProfile
	-- do something interesting with the profile
end if
Values
NameTypeDescription
return

A LiveCode array

Description

JSON arrays are translated to LiveCode numerically indexed arrays with keys 1...N and JSON objects are translated to LiveCode array key - value pairs.