bazaarvoice / jolt

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

Need help with conditional shift based on value #1208

Open mridulamurali opened 1 year ago

mridulamurali commented 1 year ago

This is the basic structure of my input: { "a": "a1", "b": { "a1": { "value": 3 }, "a2": { "value": 3 } } }

This is how I need my output to look: { "c": { "a1": { "value": 3 } } }

So I need to use the value of a to match with a key in b, and copy that whole JSONObject to a different key c. Nothing I've tried seems to work, and I'm new to jolt, so any help would be appreciated!