# Parse the data from json response

**URL:** <https://community.thunkable.com/t/parse-the-data-from-json-response/1099971>\
**Category:** Questions about Thunkable X\
**Created:** [February 16, 2021, 6:35am UTC](https://community.thunkable.com/t/parse-the-data-from-json-response/1099971 "2021-02-16T06:35:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![renuka.kataregb80nx](https://avatars.discourse-cdn.com/v4/letter/r/a9adbd/32.png) [@renuka.kataregb80nx](https://community.thunkable.com/u/renuka.kataregb80nx)\
**Post date:** [February 16, 2021, 6:35am UTC](https://community.thunkable.com/t/parse-the-data-from-json-response/1099971/1 "2021-02-16T06:35:07Z")

</div>

[{“schedule\_id”:“6194422”,“event\_id”:“214941”,“place\_id”:“22909”,“start\_date”:“20200805”,“event\_name”:"\u30ae\u30aa\u30f3\u30b3\u30fc\u30ca\u30fc",“genre\_id”:“2”,“subgenre\_id”:null,“event\_summary”:null,“start\_time”:“1800”,“end\_time”:“1845”,“flag\_d”:“0”,“flag\_c”:“0”,“distance”:“0,0”,“place\_name”:"\u5f25\u6804\u4f1a\u9928",“latitude”:“35.001743”,“longitude”:“135.775528”},{“schedule\_id”:“6021740”,“event\_id”:“242445”,“place\_id”:“21889”,“start\_date”:“20200805”,“event\_name”:"\u30e2\u30b9\u30c8\u30ea\u30fc\u30fb\u30e2\u30fc\u30c4\u30a1\u30eb\u30c8\u30fb\u30d5\u30a7\u30b9\u30c6\u30a3\u30d0\u30eb:\u30e2\u30b9\u30c8\u30ea\u30fc\u30fb\u30e2\u30fc\u30c4\u30a1\u30eb\u30c8\u30fb\u30d5\u30a7\u30b9\u30c6\u30a3\u30d0\u30eb\u30fb\u30aa\u30fc\u30b1\u30b9\u30c8\u30e9",“genre\_id”:“80”,“subgenre\_id”:“379”,“event\_summary”:null,“start\_time”:“1930”,“end\_time”:“2200”,“flag\_d”:“0”,“flag\_c”:“0”,“distance”:“0,0”,“place\_name”:"\u30ea\u30f3\u30ab\u30fc\u30f3\u30fb\u30bb\u30f3\u30bf\u30fc\u3008\u30a8\u30fc\u30f4\u30ea\u30fc\u30fb\u30d5\u30a3\u30c3\u30b7\u30e3\u30fc\u30fb\u30db\u30fc\u30eb\u3009",“latitude”:“40.772671”,“longitude”:"-73.983078"},{“schedule\_id”:“6194423”,“event\_id”:“214941”,“place\_id”:“22909”,“start\_date”:“20200805”,“event\_name”:"\u30ae\u30aa\u30f3\u30b3\u30fc\u30ca\u30fc",“genre\_id”:“2”,“subgenre\_id”:null,“event\_summary”:null,“start\_time”:“1900”,“end\_time”:“1945”,“flag\_d”:“0”,“flag\_c”:“0”,“distance”:“0,0”,“place\_name”:"\u5f25\u6804\u4f1a\u9928",“latitude”:“35.001743”,“longitude”:“135.775528”}]

how to parse this Json data ?  
I need to get the latitude and longitude from this response.  
getproperty of object gives me undefined error.  
Please help me how to parse this response and get the data.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [February 16, 2021, 7:30am UTC](https://community.thunkable.com/t/parse-the-data-from-json-response/1099971/2 "2021-02-16T07:30:40Z")

</div>

Start by pasting the full JSON response into a [JSON formatter](https://jsonformatter-online.com/). That gives you this:

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/3/f3e008f17451ad0b78cb5b82e2f87a9978389a75.png)

The green “response” block in Thunkable contains the full JSON response. When you get an object from the JSON, you can then use the property blocks to find a value. “coord” is a property of the response “object” and “lon” & “lat” are properties of the “coord” object. So this should do the trick:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/b/9b924a9fc798698165266b79f3b07cb735cb7a16.png)

Replace “lon” with “lat” to get the latitude value.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [February 16, 2021, 8:13am UTC](https://community.thunkable.com/t/parse-the-data-from-json-response/1099971/3 "2021-02-16T08:13:09Z")

</div>

Moreover to access the properties you should see that the full JSON is encapsulated in an array ( a list ) and the code need to cater for it.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [February 16, 2021, 11:02am UTC](https://community.thunkable.com/t/parse-the-data-from-json-response/1099971/4 "2021-02-16T11:02:04Z")

</div>

I have copied the response JSON from the post and used it in this simple project to show how you can obtain the data.

[https://x.thunkable.com/projectPage/602ba2a49ad9e0001214bbda](https://x.thunkable.com/projectPage/602ba2a49ad9e0001214bbda)

Because the JSON response is a list, I used a List Viewer to show the elements in the list. Once you click on any element, the lon/log will show in the two labels,

Hope this helps.

---

<div class="post-metadata">

**Author:** ![renuka.kataregb80nx](https://avatars.discourse-cdn.com/v4/letter/r/a9adbd/32.png) [@renuka.kataregb80nx](https://community.thunkable.com/u/renuka.kataregb80nx)\
**Post date:** [February 16, 2021, 1:07pm UTC](https://community.thunkable.com/t/parse-the-data-from-json-response/1099971/5 "2021-02-16T13:07:18Z")

</div>

@muneer Thankyou so much for the for working version. It works. but sometimes it shows ’ something went wrong ’ Thanks a lot for your time and help.  
@tatiang thankyou so much for the help

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:29pm UTC](https://community.thunkable.com/t/parse-the-data-from-json-response/1099971/6 "2024-11-08T13:29:22Z")

</div>


