I have a document like https://prnt.sc/w4s28w
{
"_scope": "testcasino",
"_type": "ahelp",
"account_id": "0e7e5619-9c06-43e4-b9c0-b4346c9fe351",
"data": {
"en": {
"article": "games",
"category": "074ed36b-4d08-430e-86f1-606fb75848f8",
"games": "Malta EN",
"provider": "Analyst EN"
},
"sv": {
"article": "rollete",
"category": "49e08a31-d108-45a1-81a8-36cce98b7863",
"games": "Malta SV",
"provider": "Analyst SV"
}
}
}
and i did a query
SELECT OBJECT_PUT(d1.data.en,‘category’ , OBJECT_PUT(link.data.en , ‘id’, meta(link).id ) )
FROM test
AS d1
JOIN cms-data
AS link ON KEYS d1.data.en.category
where d1._type= ‘ahelp’
but I need to get full document where all category value will by replaced to it linked object from link.data.en like
{
"_scope": "testcasino",
"_type": "ahelp",
"account_id": "0e7e5619-9c06-43e4-b9c0-b4346c9fe351",
"data": {
"en": {
"article": "games",
"**category":{ "id": "074ed36b-4d08-430e-86f1-606fb75848f8", "name":"XXX"},**
"games": " EN",
"provider": "Analyst EN"
},
"sv": {
"article": "rollete",
**"category":{ "id": "074ed36b-4d08-430e-86f1-606fb75848f8", "name":"XXX"},**
"games": "SV",
"provider": "Analyst SV"
}
}
}
Please help me ? how can I do this select request ?