Ignore the null in array

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

image

Thanks
Manohar

Hi @manohar ,
Try this option-
$response.entity[‘order-header’][‘order-lines’].filter((val,index)=> val != null)