# Api Data Filter

**URL:** <https://community.thunkable.com/t/api-data-filter/1460228>\
**Category:** Questions about Thunkable X\
**Created:** [August 20, 2021, 12:08pm UTC](https://community.thunkable.com/t/api-data-filter/1460228 "2021-08-20T12:08:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![aikansh.dua044gefzj](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@aikansh.dua044gefzj](https://community.thunkable.com/u/aikansh.dua044gefzj)\
**Post date:** [August 20, 2021, 12:08pm UTC](https://community.thunkable.com/t/api-data-filter/1460228/1 "2021-08-20T12:08:32Z")

</div>

I get the data from the api like this  
[  
{  
“date”: “8/3/2021”,  
“Name:”: “x”,  
},  
{  
“date”: “8/3/2021”,  
“Name:”: “y”,  
},  
]  
I have a list of the names[x,y,z]  
I just need to show the missing data in a list viewer in this case it should output ‘z’ since its the missing value.  
So can anyone explain how this can be done,the api currrently I am using gives the filtered data from a google sheet as an api result

---

<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:** [August 20, 2021, 1:45pm UTC](https://community.thunkable.com/t/api-data-filter/1460228/2 "2021-08-20T13:45:00Z")

</div>

The API result is already a list of objects. You need to loop through the list and check the existence of whatever you want.

---

<div class="post-metadata">

**Author:** ![aikansh.dua044gefzj](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@aikansh.dua044gefzj](https://community.thunkable.com/u/aikansh.dua044gefzj)\
**Post date:** [August 20, 2021, 3:16pm UTC](https://community.thunkable.com/t/api-data-filter/1460228/3 "2021-08-20T15:16:30Z")

</div>

Hi Muneer but how will we filter it out like let’s say I get the names i want to compare those names to a defined list and output the missing values.Is there any block for that and what condition shall I use to remove the item from the list?

---

<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:** [August 20, 2021, 3:28pm UTC](https://community.thunkable.com/t/api-data-filter/1460228/4 "2021-08-20T15:28:46Z")

</div>

I looked at your API Data and found that it is **not correct JSON**. You need to get in touch of the developers to fix it or it could be a wrong option but the current output is not usable.

---

<div class="post-metadata">

**Author:** ![aikansh.dua044gefzj](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@aikansh.dua044gefzj](https://community.thunkable.com/u/aikansh.dua044gefzj)\
**Post date:** [August 20, 2021, 4:13pm UTC](https://community.thunkable.com/t/api-data-filter/1460228/5 "2021-08-20T16:13:14Z")

</div>

Hi Muneer, I have edited the json since I wont want it share it on a public place.I have shared with you the exact output is messages.

---

<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:** [August 20, 2021, 4:26pm UTC](https://community.thunkable.com/t/api-data-filter/1460228/6 "2021-08-20T16:26:44Z")

</div>

That’s ok,  
I can fix the sample one you send and show you an example of listing missing data.

[**Edit**]

I made this quick code

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/b/7be8ab1c10726da2d36c8160a8a76c228969975b.png)  
It is taking the sample API Data (after correction) and turn it into an `object`. Then I used the data to be filtered by as a list and a simple routine to check if the name exists in the list, it is deleted and the remaining should be the names missing from the list.

Screen Demo  
 ![Not in List](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/f/6f66cac2278e37c659f10e29253eed27c795283d.gif)

---

<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:17pm UTC](https://community.thunkable.com/t/api-data-filter/1460228/7 "2024-11-08T13:17:19Z")

</div>


