cancel
Showing results for 
Search instead for 
Did you mean: 

How to use object filter method to filter dictionary list

svedantam
New Contributor

What is the correct expression from the below used to filter the records that have the Status field set to Delete Sample Payload : [{ “data”: [ { “Name”: “Harsha”, “Id”: “1234”, “City”: “NY”, “Status”: “Delete” }, { “Name”: “Chaithanya”, “Id”: “1235”, “City”: “NY”, “Status”: “Active” } ] }]
• $data.filter($data.Status!=‘Delete’)
• $data.filter(x=>x[$Status]!=‘Delete’)’
• $data.filter(x=>x[data.Status]!=‘Delete’)
• $data.filter(x=>x[“Status”]!=‘Delete’)

1 REPLY 1

alchemiz
Contributor III
$data.filter((x,y,z)=> x['Status'] != 'Delete')