Api Data Filter

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

1 Like

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

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?

1 Like

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.

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.

1 Like

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


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

1 Like