How to access keys having dots using n1QL

Hi all,

I am having trouble in accessing keys having dots in the name.
eg.
{
“data”: {
“a.b.c”: {
“mu”: 95,
“cpuu”: 95
},
“p.q.r” : 23
}

How do I access “a.b.c” and its sub objects?

Thank you.

Hey,

I got it.
It was as simple as

SELECT data.[‘a.b.c’] FROM cdoc;

Use backticks (escaped identifiers https://docs.couchbase.com/server/5.5/n1ql/n1ql-language-reference/identifiers.html) around the fields.

SELECT d.data.`a.b.c`
FROM cdoc AS d