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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insert root element into an array #159

Open
rcmorano opened this issue Apr 14, 2022 · 0 comments
Open

Insert root element into an array #159

rcmorano opened this issue Apr 14, 2022 · 0 comments

Comments

@rcmorano
Copy link

rcmorano commented Apr 14, 2022

Aloha!

First of all, thanks for building such a useful tool 馃檹

I'm trying to figure out how to transform a payload that looks like this in.json [0] into something like this out.json [1]. It's basically reparenting {{/}} within an array into a new, different object which I assumed would be easy peasy, but after having read all the examples and doc regarding transformations and functions, I've been unable to figure out how to do so 馃槗

Could you lend me a hand? Thanks in advance!

[0]

{ "context": { "foo": "bar" } }

[1]

{ "set": [ { "context": { "foo": "bar" } } ] }
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