10-19-2022 08:28 AM
hi there, I have to map an array object as in the screenshot below.
I have 2 records in that array. one is coming in as null and the other has value as in the below screenshot. how can I ignore the one that’s null and map the one with value? as it looks like its taking the second record, that’s null
Thanks
Manohar
10-19-2022 09:55 PM
Hi @manohar ,
Try this option-
$response.entity[‘order-header’][‘order-lines’].filter((val,index)=> val != null)