0
Meine Dokumente wie folgt aussehen:MongoDB Projektion auf verschachtelte Array
{
"_id" : ObjectId("58b714f753e4a2105c002416"),
"routes" : [
{
"legs" : [
{
"duration" : {
"text" : "6 mins",
"value" : 348
},
"traffic_speed_entry" : [],
}
],
"warnings" : [],
}
],
"time" : "01/03/2017 18:37:43"
}
Wie kann ich eine Tabelle mit Uhrzeit und Dauer (eine Zeile pro Array-Element) projizieren nur?
Das Beste, was ich ohne Fehler bekommen konnte, war dies:
db.getCollection('testcoll').find({}, {time:1, routes: 1})