I am creating an app for Android and hopefully for iOS as well where I am using Unity to send commands to a Particle Photon device. I can send the commands to it by using the WWWPOST Mobile action. It works great and is doing what I need it to do. However, I am having a problem with trying to figure out how to parse information from a returned string.
The following string is returned after sending the command:
{
"id": "xxxxxxxxxxxxxxxxxxxxxxxxx",
"last_app": "",
"connected": true,
"return_value": 1
}
My question is, how would I pull the information for the "return_value": and save it to a variable? In the above example, I would need to save the '1' as an int variable. That number changes depending on which command I send, and would like to be able to check what state the device is in.
Any help on this issue would be greatly appreciated.
Thanks!
Dave