Dataweave - Filter if a field value is null or not Dataweave - Filter if a field value is null or not json json

Dataweave - Filter if a field value is null or not


This is quite simple just use the filter operator in a message transform message processor.

%dw 2.0output application/json---payload filter ((item, index) -> item.error != null)


Below is another way

payload[?($.error != null)]