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.

Hi,

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

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

Hi,

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 ba.id

which generates something like this where bbb is in an array

{[
ba:{ doc},
bb:[{doc1}]
]}

to instead generate

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

Just wondering if this is possible?

Best

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