How to get table attribute(Entities) list in couch base

how to get table attribute(Entities) list in couch base. I have a document, I want to get all entities list.
How can I retrieve all attribute?

OBJECT_NAMES() gives current level of object . There is no easy way get all paths or recursive way.

https://docs.couchbase.com/server/5.5/n1ql/n1ql-language-reference/objectfun.html#object_namesexpression