Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Hi, there
I have converted my JSON object to string (by means of the .parse) so that I could split the values.
Now I want to update my thing properties with the values from my JSON object.
This JSON object and the thing properties are all on one thing.
I only managed to update the value at [0] index. When I try index [1] or higher, it throws an error.
Could you direct me if this issue has been solved already or any suggestions on how to achieve the updating of thing properties with the respective json values?
Much appreciated.
Solved! Go to Solution.
@Janicen : Please go through the documentation for working in json objects.
So , lets suppose if you have json stored on a property 'propjson' on your thing, then you can extract a value from the json using its 'key' and store it on a property defined on your thing. Eg.
var json = me.propjson;
me.newval=json['dataChangeType'] ;
@Janicen : Please go through the documentation for working in json objects.
So , lets suppose if you have json stored on a property 'propjson' on your thing, then you can extract a value from the json using its 'key' and store it on a property defined on your thing. Eg.
var json = me.propjson;
me.newval=json['dataChangeType'] ;