You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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' } ]
The text was updated successfully, but these errors were encountered: