Help getting/routing bracket values inside [dict]

gumi's icon

Hi,

I'm trying to route data located inside brackets in the [dict] object via "get" messages. I have no problem routing data inside braces using "get body::value1::value2" for example, but I cannot figure out how to get data from brackets. I'm using the INQStats API, which returns JSON. I think I just need to format my "get" messages a certain way but I've had no luck searching the forum. Any help would be much appreciated. Demo patch is attached. Thanks.

Max Patch
Copy patch and select New From Clipboard in Max.

Peter McCulloch's icon

There should be an example of this in one of the tabs of dict's help file. IIRC the syntax is something like: get body::values[0]

HTH

gumi's icon

Yes! Thanks so much. I was getting confused about the order/structure of brackets and colons. So to get population data by year I used "get body[0]::population[3]::data"

Here's the updated patch for people of the future:

Max Patch
Copy patch and select New From Clipboard in Max.