Replies: 1 comment
|
I see. Well, I will think about adding spear operator to Expr. Right now you can do this: let obj = {
first: {
id: 1,
status: "Succeeded",
},
second: {
id: 2,
status: "Skipped",
}
};
map(toPairs(obj), {
{
name: #[0],
id: #[1].id,
status: #[1].status
}
})Or you can convert to array , concat, and back to map: map(toPairs(obj), {
[['name', #[0]]]
| concat(toPairs(#[1]))
| fromPairs()
}) |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I want to convert this object
Into this list of objects
The closest I can get is using
which yields
Any suggestion?
All reactions