eel icon indicating copy to clipboard operation
eel copied to clipboard

Insert root element into an array

Open rcmorano opened this issue 2 years ago • 0 comments

Aloha!

First of all, thanks for building such a useful tool :pray:

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 :sweat:

Could you lend me a hand? Thanks in advance!

[0]

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

[1]

{ "set": [ { "context": { "foo": "bar" } } ] }

rcmorano avatar Apr 14 '22 01:04 rcmorano