My App uses JSON to send commands to an Arduino.
One value has to be a number, not a string. But AI2 doesn't convert the string from a textbox to a number. How can I force this?
Block:
JSON string received by Arduino (note the quotes around the TANKCAPACITY value). The ID is formatted correctly as a number, but that number is defined in the code and not retrieved from a textbox.
16:32:30.310 -> {
16:32:30.310 -> "ID": 28,
16:32:30.310 -> "CMD": "SET",
16:32:30.310 -> "SET": "TANKCAPACITY",
16:32:30.310 -> "TANKCAPACITY": "25"
16:32:30.310 -> }
Ignore the timestamps, they are not part of the message.