I have the following doc scheme:
{
"_id": 123123123,
"linhas": [1,2,3]
}
And i want all of them to turn to the following scheme:
{
"_id": 123123123,
"linhas": [{
"id":1,
"duracao": 14
},{
"id":2,
"duracao": 14
},{
"id":3,
"duracao": 14
}]
}
I other words, i want all numbers from the array to turn into ids of objects inside the same array. How can i do that with a mongo query?