Extracting JSON Arrays from inside Json Objects

Mark Wieder mwieder at ahsoftware.net
Mon Jul 18 15:59:03 EDT 2016


Sannyasin Brahmanathaswami <brahma at ...> writes:
> so this would translated into, using your model
>  
> {"file_id": "p6_rajam",
>           "formats": [
>         {
>    "2531x4000": {
>             "filename": "p6_rajam_ful.jpg",
>              "isbn": null,
>             "item_format_id": 43430,
>             "item_id": 3268,
>             "sale_date": "0000-00-00 00:00:00",
>             "url": null
>         },
>    "911x1440"
>              {
>             "filename": "p6_rajam_lrg.jpg",
>              "isbn": null,
>             "item_format_id": 43429,
>             "item_id": 3268,
>             "sale_date": "0000-00-00 00:00:00",
>             "url": null
>         },
>        
>  

Ah, no...
if you're going to insist on the JSON list format using the "[" and "]"
delimiters, then you're going to have to use numeric indices.

I was suggesting instead:

> {"file_id": "p6_rajam",
>           "formats": 
>         {
>    "2531x4000": {
>             "filename": "p6_rajam_ful.jpg",
>              "isbn": null,
>             "item_format_id": 43430,

etc. (difference in the "formats": line)

--
 Mark Wieder
 ahsoftware at gmail.com






More information about the use-livecode mailing list