0
votes

I have the following mongodb's query:

db.history.distinct('city',{code: 'A-200-01'})

Then I get this:

[1.0, 2.0]

As you can see it's a simple array. And i'd like to get an array with two arrays inside of it using a mongoose or mongodb's query. Something like this:

"property": [ [1.0], [2.0] ]

This is my first time using mongoose and mongodb's querys so i hope you guys could help me, that would be awesome