How to include joined output into an existing object?

Hello,

I have two documents.

doc1
{
    "values": {
        "name": "name1"
    }
}

doc2
{
    "values": {
        "address": "address"
    }
}


select bucket1.`values`, bucket2.`values` as extra from bucket bucket1 use keys "doc1" join bucket bucket2 on keys "doc2";

Joining these documents outputs

{
    "values": {
        "name": "name1"
    },
    "extra": {
        "address": "address"
    }
}

Is there way to include joined output into an object?

Desired output

"values": {
    "name": "name1",
    "extra": {
        "address": "address"
    }
}

Yes.

SELECT OBJECT_ADD(bucket1.`values`, “extra”, bucket2.`values`) AS `values` …

I believe that is new to 4.5. I will wait for 4.5 :slight_smile: