Insert root element into an array
- Dominant language
- Go
- Stars
- 108
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
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" } } ] }
```
Contributor guide
Research direction
The issue provides only the input and desired output JSON examples, with no file, test, or entry point named. Start by reading the transformation documentation and examples to determine whether root reparenting in an array is supported. Done means confirming the required transformation or documenting and testing a way to produce the shown output.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100