Issue asigning and converting _id value to string in aggregate concat


#1

I installed the package meteorhacks:aggregate.

I tried an aggregate function to get and concat some values without succes, my issue comes up when i assign an _id to a variable called valueid which is returning a null value.

let ciudadesTotal = ciudades.aggregate(
[
{ $project: { valueid:{$concat: “$ciudades._id”.toString()}, label: { $concat: [ “$nombreMunicipio”, " - ", “$nombreDepartamento” ] } } }
]
);

The structure of my collection is the following

“_id”: {
"_str": “580061f6f35f931501b374e7”
},
“codigoMunicipio”: 99773,
“nombreDepartamento”: “Vichada”,
“nombreMunicipio”: “CUMARIBO”,

This is what i’m geting as result of my query:

{ _id: 580061f6f35f931501b374e7,
I20161014-02:02:21.088(-5)? value: null,
I20161014-02:02:21.088(-5)? label: ‘CUMARIBO - Vichada’ } ]