# API Data in List Viewer

**URL:** <https://community.thunkable.com/t/api-data-in-list-viewer/56591>\
**Category:** Questions about Thunkable X\
**Tags:** listviewer, webapi\
**Created:** [November 15, 2018, 9:52pm UTC](https://community.thunkable.com/t/api-data-in-list-viewer/56591 "2018-11-15T21:52:08Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stefan\_A](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@Stefan\_A](https://community.thunkable.com/u/Stefan_A)\
**Post date:** [November 15, 2018, 9:52pm UTC](https://community.thunkable.com/t/api-data-in-list-viewer/56591/1 "2018-11-15T21:52:08Z")

</div>

Hello,

I am a complete beginner with Thunkable but got quite a lot experience with other tools.  
I am trying to list API-Data in a list viewer. So far, I managed to get the Data from the API but there is only one item being displayed in the list viewer. I know this is due to the “get last or get first of” in the “in list item” but I have no idea how to loop through the response-data of the API. I tried different things but nothing worked.  
The json-data looks like this:  
{  
“response”: {  
“results”: [  
{  
“Adresse”: “Grinzinger Str. 50, 1190 Wien”,  
“Bewertungen”: 20,  
“Name”: “FRANCESCO Grinzing”,  
},  
{  
“Adresse”: “Grinzinger Str. 1, 1190 Wien”,  
“Bewertungen”: 2,  
“Name”: “L’Osteria Wien Grinzing”,  
},…

My block logic looks like this:

 ![Unbenannt](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/6/06e763db22a04d5efbbc00fbd4541f44a0cc8372.png)  
Please help me, to get all Data displayed in the grid viewer.  
Thanks, Stefan

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [November 16, 2018, 6:41am UTC](https://community.thunkable.com/t/api-data-in-list-viewer/56591/2 "2018-11-16T06:41:17Z")

</div>

Hi,

“results” is an array of objects, and arrays are looped through “for each item in list” block.

---

<div class="post-metadata">

**Author:** ![Stefan\_A](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@Stefan\_A](https://community.thunkable.com/u/Stefan_A)\
**Post date:** [November 16, 2018, 6:58am UTC](https://community.thunkable.com/t/api-data-in-list-viewer/56591/3 "2018-11-16T06:58:58Z")

</div>

Hello,

thanks for your answer. I know, that its an array of objects but I need help looping through it…it just doesnt work, because I dont know, how to do it.

Can you help me?

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [November 16, 2018, 7:00am UTC](https://community.thunkable.com/t/api-data-in-list-viewer/56591/4 "2018-11-16T07:00:44Z")

</div>

If you give me a link to your project, then I will help.

---

<div class="post-metadata">

**Author:** ![Stefan\_A](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@Stefan\_A](https://community.thunkable.com/u/Stefan_A)\
**Post date:** [November 16, 2018, 7:23am UTC](https://community.thunkable.com/t/api-data-in-list-viewer/56591/5 "2018-11-16T07:23:46Z")

</div>

[https://x.thunkable.com/copy/aa7ccb82b5dcf48e32b30eafa21fac80](https://x.thunkable.com/copy/aa7ccb82b5dcf48e32b30eafa21fac80)

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [November 16, 2018, 8:53am UTC](https://community.thunkable.com/t/api-data-in-list-viewer/56591/6 "2018-11-16T08:53:12Z")

</div>

Check it.

[https://x.thunkable.com/projects/5bee81b8da9275432c5f322b/project/properties/designer/](https://x.thunkable.com/projects/5bee81b8da9275432c5f322b/project/properties/designer/)

---

<div class="post-metadata">

**Author:** ![Stefan\_A](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@Stefan\_A](https://community.thunkable.com/u/Stefan_A)\
**Post date:** [November 16, 2018, 9:06am UTC](https://community.thunkable.com/t/api-data-in-list-viewer/56591/7 "2018-11-16T09:06:33Z")

</div>

Thank you very much for your help!!! 🙂

---

<div class="post-metadata">

**Author:** ![TechTeacher](https://avatars.discourse-cdn.com/v4/letter/t/e9c0ed/32.png) [@TechTeacher](https://community.thunkable.com/u/TechTeacher)\
**Post date:** [January 7, 2019, 3:51pm UTC](https://community.thunkable.com/t/api-data-in-list-viewer/56591/8 "2019-01-07T15:51:56Z")

</div>

actech - your solution is great for data that is in a list within a property, but I’m trying to apply this concept to a data set that is a list from the very first part of the object.

ex: [http://dataservice.accuweather.com/locations/v1/cities/search?apikey=9KUjWtqGJtYd7CAEz5EqkpUziLrjI6XN&q=boston](http://dataservice.accuweather.com/locations/v1/cities/search?apikey=9KUjWtqGJtYd7CAEz5EqkpUziLrjI6XN&q=boston)

From this data I am trying to grab the latitude and longitude of just the first city listed. But, my solution (based on your design) is getting stuck. Here is a screenshot of my code

 ![59%20AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/2/22604db4ceb950a6adf3dc57e9f70039540eddb1.png) . (FYI: My ultimate goal is to take a user entered city and put it on the map using longitude and latitude.)

---

<div class="post-metadata">

**Author:** ![Cian\_O\_Sullivan](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/cian_o_sullivan/32/34494_2.png) [@Cian\_O\_Sullivan](https://community.thunkable.com/u/Cian_O_Sullivan)\
**Post date:** [January 7, 2019, 11:42pm UTC](https://community.thunkable.com/t/api-data-in-list-viewer/56591/9 "2019-01-07T23:42:44Z")

</div>

You are refering to a variable I am not sure is correct, that being J

You need to be parsing the JSON, and attaching the RESPONSE instead of J. Try that.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/2/5238c32182a1fd59a22d472193c4d3db30727bc3.jpeg)

---

<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, 11:52am UTC](https://community.thunkable.com/t/api-data-in-list-viewer/56591/10 "2024-11-08T11:52:46Z")

</div>


