So, basically, I have this array of IDs:
> arrayDeptID
[
{
"departamento_id" : 0
},
{
"departamento_id" : 2
},
{
"departamento_id" : 5
},
{
"departamento_id" : 6
}
]
And I want to transform it to an array that contains only the values on the document field departamento_id, something like this:
[0, 2, 5, 6]
Is there any way to do it in MongoDB shell?