micpool's picture

Vuo receives an OSC message with this value:

{"status":"ok","data":[{"number":"1","uniqueID":"E680367C-097E-4319-92BA-E108583C41BF","flagged":false,"listName":"Billionaire_Glee_Cast.mp3","type":"Audio","colorName":"none","name":"","armed":true},{"number":"2","uniqueID":"DAD8E848-5932-4CA0-920D-88B83DF213DB","flagged":false,"listName":"DontstopbelievingGleeCastG.mp3","type":"Audio","colorName":"none","name":"","armed":true}],"workspace_id":"D711C621-2EA5-4C00-91F4-5E4A23E813E7","address":"\/workspace\/D711C621-2EA5-4C00-91F4-5E4A23E813E7\/runningOrPausedCues"}

The Make tree from JSON node shows 5 children status data data workspace_id address

If I use a Find Subtree Node with Name "number" I get a value of "1"

How would I get the number from the second data child in the JSON message (i.e "2")?

Thanks

Comments

Mic,

jmcc's picture
Submitted by

Mic,

The node set documentation says, "A Tree’s name, attributes, and content refer to just one level of the Tree. Each child Tree has its own name, attributes, and content." So you want to make sure you include descendants to get a list of the appropriate trees, and then process those trees to show the information you want. There is a simple example composition attached.