@gobassky I’m wondering if you know how to retrieve data from a JSON object that has backslashes in the property names?
Here’s the project I’m testing, as described below:
https://x.thunkable.com/copy/bba5f49b89956f99acfa2b0c3fa66552
When I go to this url: https://www.purpleair.com/json?key=52AUOV78J1OX3R2J&show=21371, the formatted data I want is in response–>results[1]–>Stats–>v1
The url creates this JSON:
{“mapVersion”:“0.17”,“baseVersion”:“7”,“mapVersionString”:"",“results”:[{“ID”:21371,“Label”:“Sbirdee”,“DEVICE_LOCATIONTYPE”:“outside”,“THINGSPEAK_PRIMARY_ID”:“649474”,“THINGSPEAK_PRIMARY_ID_READ_KEY”:“52AUOV78J1OX3R2J”,“THINGSPEAK_SECONDARY_ID”:“649475”,“THINGSPEAK_SECONDARY_ID_READ_KEY”:“Y2BNKU6L0YFESCBY”,“Lat”:38.085761,“Lon”:-122.566461,“PM2_5Value”:“81.77”,“LastSeen”:1598446433,“Type”:“PMS5003+PMS5003+BME280”,“Hidden”:“false”,“DEVICE_BRIGHTNESS”:“15”,“DEVICE_HARDWAREDISCOVERED”:“2.0+BME280+PMSX003-B+PMSX003-A”,“Version”:“6.01”,“LastUpdateCheck”:1598443311,“Created”:1544549222,“Uptime”:“198480”,“RSSI”:"-66",“Adc”:“0.01”,“p_0_3_um”:“13325.73”,“p_0_5_um”:“3832.95”,“p_1_0_um”:“766.7”,“p_2_5_um”:“75.8”,“p_5_0_um”:“11.79”,“p_10_0_um”:“3.95”,“pm1_0_cf_1”:“77.7”,“pm2_5_cf_1”:“123.45”,“pm10_0_cf_1”:“138.39”,“pm1_0_atm”:“51.02”,“pm2_5_atm”:“81.77”,“pm10_0_atm”:“91.36”,“isOwner”:0,“humidity”:“59”,“temp_f”:“68”,“pressure”:“1009.94”,“AGE”:1,“Stats”:"{“v”:81.77,\“v1\”:87.06,“v2”:80.05,“v3”:77.98,“v4”:79.71,“v5”:53.03,“v6”:11.95,“pm”:81.77,“lastModified”:1598446433467,“timeSinceModified”:119989}"},{“ID”:21372,“ParentID”:21371,“Label”:“Sbirdee B”,“THINGSPEAK_PRIMARY_ID”:“649477”,“THINGSPEAK_PRIMARY_ID_READ_KEY”:“W62KA2YR9E5GUYFO”,“THINGSPEAK_SECONDARY_ID”:“649479”,“THINGSPEAK_SECONDARY_ID_READ_KEY”:“30PAG36NS1DTWWLA”,“Lat”:38.085761,“Lon”:-122.566461,“PM2_5Value”:“79.94”,“LastSeen”:1598446433,“Hidden”:“false”,“Created”:1544549222,“Adc”:“0.01”,“p_0_3_um”:“13866.0”,“p_0_5_um”:“3953.7”,“p_1_0_um”:“691.52”,“p_2_5_um”:“69.39”,“p_5_0_um”:“9.39”,“p_10_0_um”:“1.57”,“pm1_0_cf_1”:“76.39”,“pm2_5_cf_1”:“120.91”,“pm10_0_cf_1”:“127.5”,“pm1_0_atm”:“50.2”,“pm2_5_atm”:“79.94”,“pm10_0_atm”:“84.3”,“isOwner”:0,“AGE”:1,“Stats”:"{“v”:79.94,“v1”:84.56,“v2”:77.66,“v3”:75.66,“v4”:77.9,“v5”:52.09,“v6”:11.78,“pm”:79.94,“lastModified”:1598446433467,“timeSinceModified”:119989}"}]}
The forum software strips out the backslashes but I’ve added them back in in the bold section above.
Do you know how I can access Stats → {\“v1\”} ?
I’ve tried including quotes and backslashes, including just quotes, and just using v1 by itself but they are all “undefined” even though my does contain is true:
And I’ve tried it with and without the generate JSON from object block.
But it still returns “undefined.”