Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to replace inner object with just one value? #1222

Open
dhoffer opened this issue Oct 12, 2023 · 0 comments
Open

How to replace inner object with just one value? #1222

dhoffer opened this issue Oct 12, 2023 · 0 comments

Comments

@dhoffer
Copy link

dhoffer commented Oct 12, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant