# Web API help with square brackets

**URL:** <https://community.thunkable.com/t/web-api-help-with-square-brackets/983234>\
**Category:** Questions about Thunkable X\
**Tags:** beginner\
**Created:** [November 18, 2020, 5:56pm UTC](https://community.thunkable.com/t/web-api-help-with-square-brackets/983234 "2020-11-18T17:56:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dreadlordfluffybunny](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@dreadlordfluffybunny](https://community.thunkable.com/u/dreadlordfluffybunny)\
**Post date:** [November 18, 2020, 5:56pm UTC](https://community.thunkable.com/t/web-api-help-with-square-brackets/983234/1 "2020-11-18T17:56:38Z")

</div>

i am trying to get data from the openweather API, the specific data i am trying to get is “weather.id”. so far i have tried doing get property of object ‘id’ and then linked to get property of object ‘weather’ which links to get object from json that goes into response. this has worked just fine for the other api calls im using such main.temp and main.feels\_like. one thing i noticed though was in the api code the weather.id is in square brackets as well as curly brackets. whereas the others are just in curly brackets. ie.  
“weather”:[{“id”:803,“main”:“Clouds”,“description”:“broken clouds”,“icon”:“04d”}]  
so i guess my question is how do i call stuff inside square brackets with thunkable. thanks in advance

---

<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:** [November 18, 2020, 7:20pm UTC](https://community.thunkable.com/t/web-api-help-with-square-brackets/983234/2 "2020-11-18T19:20:32Z")

</div>

The brackets in JSON indicate a list (aka array).

So for weather”:[{“id”:803,“main”:“Clouds”,“description”:“broken clouds”,“icon”:“04d”}]

You’d need to get the object property “weather” and then get the list item #1 from that value.

Like this:

 ![Screen Shot 2020-11-18 at 11.24.08 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/a/8ab626616aa774702abe6a5e2dd32c2639d13e59.png)

If instead you had a JSON array with multiple items, like this:

weather”:[{“id”:803,“main”:“Clouds”,“description”:“broken clouds”,“icon”:“04d”},{“id”:955,“main”:“Clouds”,“description”:“scattered clouds”,“icon”:“02d”}]

Then, to get the second array/list info, you would just change the get #1 in the list block above to get #2.

I find it really helpful to copy and paste the JSON result I get into this website for easier formatting: [https://jsonformatter-online.com](https://jsonformatter-online.com).

---

<div class="post-metadata">

**Author:** ![dreadlordfluffybunny](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@dreadlordfluffybunny](https://community.thunkable.com/u/dreadlordfluffybunny)\
**Post date:** [November 18, 2020, 8:21pm UTC](https://community.thunkable.com/t/web-api-help-with-square-brackets/983234/3 "2020-11-18T20:21:31Z")

</div>

Thank you so much that was my issue!

---

<div class="post-metadata">

**Author:** ![james.malvil3t](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@james.malvil3t](https://community.thunkable.com/u/james.malvil3t)\
**Post date:** [June 18, 2024, 10:56pm UTC](https://community.thunkable.com/t/web-api-help-with-square-brackets/983234/4 "2024-06-18T22:56:56Z")

</div>

just wanted to mention about the link it’s not working, I used [https://jsonformatter.org](https://jsonformatter.org) to make it work

---

<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:** [June 19, 2024, 5:04am UTC](https://community.thunkable.com/t/web-api-help-with-square-brackets/983234/5 "2024-06-19T05:04:28Z")

</div>

This topic is four years old. But I use [Best JSON Viewer and JSON Beautifier Online](https://codebeautify.org/jsonviewer) now. It’s similar to the link you posted.

---

<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, 12:21pm UTC](https://community.thunkable.com/t/web-api-help-with-square-brackets/983234/6 "2024-11-08T12:21:38Z")

</div>


