Extracting JSON Arrays from inside Json Objects
Mark Wieder
mwieder at ahsoftware.net
Fri Jul 15 20:45:44 EDT 2016
On 07/15/2016 11:28 AM, Sannyasin Brahmanathaswami wrote:
> I actually think I like using a nested object
Right. I wasn't suggesting *not* using a nested object, just changing
the format slightly:
{
"file_id": "gr_1999-01-11_the-path-to-god",
"file_size": null,
"file_type": null,
"format": null,
"formats": {
"mp3": {
"filename": "gr_1999-01-11_the-path-to-god.mp3",
"isbn": null,
"item_format_id": 1009,
"item_id": 1217,
"sale_date": null,
"url": null
},
"pdf": {
"filename": "this_is_my_filename.pdf",
"isbn": null,
"item_format_id": 1009,
"item_id": 1217,
"sale_date": null,
"url": null
}
},
"framesize": null,
"genre": null
}
That way you pick out the information from the array as
aLiveCodeArray["formats"]["mp3"]["filename"]
--
Mark Wieder
ahsoftware at gmail.com
More information about the use-livecode
mailing list