Accessing layered JSON data with dict.unpack
Hi,
I have JSON from an API, which I have stored in [dict] via [maxurl].
In [dict] I can see the data has been successfully written. I try to access the data through [dict.unpack]. However, [dict.unpack] can't access the full data structure. I can unpack the top level "body" however I can't unpack body::data , and ::data is where all the good stuff is stored...
I've assumed use of the double colon :: syntax was valid for accessing lower levels of a JSON object however I get 'could not create prototype dictionary with args' error
Hopefully this is clear,
I've uploaded a patch
- if you collapse / access the menus in the view box you'll see the structure I am dealing with.
Thanks
MJ
I used regex to unpack sections. Im trying to find the tutorial I used but it uses something like
regexp (.*?)...(*.) to find all data of certain types between certain characters.
Ill try to leave this window open and report anything that works for me.
Im using get to maxurl into dict also. Then regexp for a certain section, then using that for another query which returns a diff json formatted block.
This one i really wanna unpack elegantly without excessive regexp (tho knowing reg ex is mastery level voodoo)...
https://cycling74.com/forums/for-regexp-gurus