Ich habe die folgenden JSON in meinem Couchbase Eimer "geo"
gespeichert.Couchbase Abfrage-Array
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"ID": "1753242",
"TYPE": "8003"
}
},
{
"type": "Feature",
"properties": {
"ID": "4823034",
"TYPE": "7005"
}
},
{
"type": "Feature",
"properties": {
"ID": "4823034",
"TYPE": "8003"
}
}
]
}
Um alle "features"
mit "properties.TYPE : 8003"
ich folgendes probiert.
SELECT features FROM geo
WHERE ANY f IN features SATISFIES f.properties.TYPE = "8003" END;
Aber das gibt das ganze json Dokument und nicht nur die "features"
mit den properties.TYPE "8003"
. Weiß jemand, wie man abfragt, um nur die zusammenpassenden Eigenschaften mit "properties.TYPE": "8003"
als Ergebnis zu erhalten?
Sie auch UNNEST verwenden. – geraldss