bazaarvoice / jolt

JSON to JSON transformation library written in Java.
Apache License 2.0
1.54k stars 328 forks source link

Remove empty node in the Json Array #1151

Closed Dhanrajkannan closed 2 years ago

Dhanrajkannan commented 2 years ago

Can someone help with Jolt spec for below requirement. I tried recursivelySquashNulls , but it didn't help. Thanks in advance! Input: { "individuals": [ { "individual": { "LastName": "Ind1-LastName", "firstName": "Ind1-FirstName" } }, { "individual": {} } ] } Expected output: { "individuals": [ { "individual": { "LastName": "Ind1-LastName", "firstName": "Ind1-FirstName" } } ] }

Dhanrajkannan commented 2 years ago

It's been answered here - https://stackoverflow.com/questions/73148281/jolt-tranform-remove-empty-node-in-the-json-array/73148674#73148674

Hence closing the issue.