Join result - nested rand hand output added but not as an array?

Is it possible using Join to return result where the right hand output is nested within left but not as an array? We have an object with a one-to-one relationship.


You can do a join, and then use your SELECT list.

SELECT lhs.*, rhs …
FROM lhs JOIN rhs …


I was actually trying to see if it was possibe using JOIN or NEST to have the resulting Json Doc to be like

Select * from defaut ba NEST default bb ON KEYS

which generates something like this where bbb is in an array

ba:{ doc},

to instead generate

ba:{ ba fields , bb:{ doc1}}

Just wondering if this is possible?


SELECT {ba fields, “bb”:bb} as ba
FROM default ba JOIN default bb …