Open dhoffer opened 1 year ago
I have a nested JSON object structure where at the innermost object (and the field name ends with 'Tag') I want to replace that object with just the value if its 'value' field. I also want to remove the Tag suffix from the field name.
I'm trying to transform this:
"safeguardingAndSharingTagArea": { "usageRightsTagClass": { "usageRightsTag": { "value": "R5", "tagValueSources": [ "CONFIG" ], "defaultValue": null, "required": false } }, "specialControlsTagClass": { "controlsTag": { "value": "H4", "tagValueSources": [ "CONFIG", "PAYLOAD_OVERRIDE" ], "defaultValue": null, "required": false } },
Into this:
"safeguardingAndSharingTagArea": { "usageRightsTagClass": { "usageRights": "R5" }, "specialControlsTagClass": { "controls": "H4" },
How can I do this with Jolt?
Thanks, -Dave
I have a nested JSON object structure where at the innermost object (and the field name ends with 'Tag') I want to replace that object with just the value if its 'value' field. I also want to remove the Tag suffix from the field name.
I'm trying to transform this:
"safeguardingAndSharingTagArea": { "usageRightsTagClass": { "usageRightsTag": { "value": "R5", "tagValueSources": [ "CONFIG" ], "defaultValue": null, "required": false } }, "specialControlsTagClass": { "controlsTag": { "value": "H4", "tagValueSources": [ "CONFIG", "PAYLOAD_OVERRIDE" ], "defaultValue": null, "required": false } },
Into this:
"safeguardingAndSharingTagArea": { "usageRightsTagClass": { "usageRights": "R5" }, "specialControlsTagClass": { "controls": "H4" },
How can I do this with Jolt?
Thanks, -Dave