I have three documents like below
key : parent::1
{
"id" : "1",
"preview": {
"sub-doc": {
"id" : "1"
},
"child-doc": {
"id" : "2"
}
}
}
sub::1
{
"id" : "1",
"picture": {
"avatar" : "url"
}
}
child::2
{
"id": "2",
"name": {
"first": "First Name",
"second": "Second Name"
}
}
I want to nest the subdoc into parent and expected output is like this
key : parent::parent-id
{
"id" : "1",
"preview": {
"sub-doc": {
"id" : "1",
"picture": {
"avatar" : "url"
}
},
"child-doc": {
"id": "2",
"name": {
"first": "First Name",
"second": "Second Name"
}
}
}
}
Since i know each of the key so i will use the key in parent for ANSI join