Extract data from MQTTClient DAT Help!

Hi @swaraich,

great to hear you were able to connect - can you post the solution to your previous question? Other’s will greatly benefit from that.

Regarding your question here. The MQTT Client DAT has a callbacks DAT attached where you can deal with the data as it is coming in. Specifically the onMessage callback is of interest.

First have a look here to see how you can retrieve values:

In your specific case it looks like you are being served a json which you would want to parse using python’s json module.
For a general introduction to TouchDesigner and Python, have a look at our curriculum, especially the section on “DATs: Scripting and Python”. It has a short Chapter on JSON parsing as well:

Hope this helps
cheers
Markus