I am learning N1QL and have a question about a data structure/query. Given the following document how would I form a query that returned only the data element “fs” within the nested element that is keyed by “12”? i.e.
“fs”: “0.885379982E+01”,
It seems like a simple thing to do but I keep trying different things that aren’t working.
thanks
{
"id": "DD::V01::SAL1L2::GFS::G2/NHX::HGT::GFS::P1000::2018010100",
"type": "DataDocument",
"dataType": "V01_type1",
"subset": "mv",
"dataFile_id": "DF_id",
"datasource_id": "DS_id",
"version": "V01",
"model": "ford",
"geoLocation_id": "123",
"data": {
"12": {
"fl": "12",
"total": "3600.",
"fs": "0.885379982E+01",
"o1": "0.815554852E+01",
"m1": "0.473878674E+04",
"ff": "0.472373419E+04",
"fa": "0.477779363E+04",
"oo1": null
},
"18": {
"fl": "18",
"total": "3600.",
"f5": "0.920275537E+01",
"o1": "0.815554852E+01",
"m1": "0.476554197E+04",
"ff": "0.478906976E+04",
"fa": "0.477779363E+04",
"oo1": null
},
"24": {
"fl": "24",
"total": "3600.",
"f5": "0.924388284E+01",
"o1": "0.815554852E+01",
"m1": "0.477780374E+04",
"ff": "0.482988206E+04",
"fa": "0.477779363E+04",
"oo1": null
},
"30": {
"fl": "30",
"total": "3600.",
"f5": "0.969193197E+01",
"o1": "0.815554852E+01",
"m1": "0.479433046E+04",
"ff": "0.488857497E+04",
"fa": "0.477779363E+04",
"oo1": null
}
}
}