How to filter the specific data in an API by using list

hello,
I am making an api call from new call api option using js object that ran sucessfully i am trying to filter the data by status field like “pickup”&“drop”. After that in an list widgets i want to print only “drop” status data.how i can filter and display in list.

Hello @shivam.agrawal ,
Can you share a screenshot of what the response from the API looks like?


I am getting the response in the console but I am unable to show this data in list

Hey @shivam.agrawal!

To filter the data you can use the .filter() method of arrays in JS to do this. To filter by status you would use something like this:

parcel_reservation_dtl.data.records.filter(record => record.reservation_status === "drop")

This will return a filtered array of containing only records where the status is "drop".

Thank you for your response. I will look into that. :blush:

Hello @shivam.agrawal, Just to confirm, does the button click redirects you to that page where you need to access the ID?

yes, button is redirecting to the page with information Thank you for your reply.

You can send query parameters with the URL with navigateTo and access them on the next page with appsmith.URL.queryParams. You can read more about this in our docs.