Skip to content

Insert root element into an array  #159

@rcmorano

Description

@rcmorano

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" } } ] }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions