cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with list operation

Bhagya_pola
Executive Chef I
Executive Chef I

Currently I am trying to map  list  itemsScreenshot 2026-01-06 182121.png

 

Currently, when the entire list has no data, the output is generated in the following format:

{ "list": [{}, {}, {}] }

However, if the list is completely empty, I don’t want the array to appear at all in the output payload. The list field should be entirely omitted, with no empty objects or placeholders included.

Is there a workaround to conditionally exclude this field from the output when no data is present?

 
5 REPLIES 5

Nadella_Rajesh
Deputy Chef I
Deputy Chef I

Use Compact method to remove the empty arrays