Description
A function OBJECT_FIELD has been added and needs to be documented along with the other OBJECT_ functions https://docs.couchbase.com/server/7.0/n1ql/n1ql-language-reference/objectfun.html.
OBJECT_FIELD(object, string-field-name)
|
The function extracts the value for the given field name from the object if it exists. This may be a nested field name but must be provided in the string as would be addressed outside the string, e.g. "`field name with spaces`" (note the embedded back quotes).
OBJECT_PATHS() returns possible valid field names for an object, e.g.
select object_paths(default) from default use keys['Weston_3077363']; |
...
|
"results": [ |
{
|
"$1": [ |
"doc_type", |
...
|
"shipped_order_history[3].order_datetime", |
"shipped_order_history[3].order_id" |
]
|
...
|
select object_field(default,"shipped_order_history[3].order_datetime") from default use keys['Weston_3077363']; |
...
|
"results": [ |
{
|
"$1": "Wed Sep 4 08:22:23 2013" |
...
|