What is your goal?
As the title says, my goal is to create an object (collection) wrapped in an array only using inline functions. I know about iterator/aggregator solutions - the goal is to avoid these to save operations.
For more context - I have value from a webhook that looks like this:
“emailAddress”: “not@yourmom.com”
I need to create an output like this:
[
{
“label”: null,
“value”: “not@yourmom.com”
}
]
Please note this is an object wrapped in an array.
I have no problem creating the object like this:
{
“label”: null,
“value”: “not@yourmom.com”
}
However, I have not been able to wrap it into an array.
I appreciate any hints on how to do this. Thanks in advance.
What is the problem & what have you tried?
I have tried multiple combinations of all possible array functions to no avail.