i have this problem with RethinkDB.
I have 3 documents:
Person (the account field is an secundary id):
{
"account": "3580654" ,
"id": "356ee84a-8eb5-4b9e-8af5-1cf1ebfe556d" ,
"name": "Jesus",
"lastname": "Omilon"
}
Location (the account field is an secundary id):
{
"account": "3580654" ,
"id": "53d02b06-8fe2-4d48-a8ab-ffd2ff519a32" ,
"ip": "127.0.0.1",
"state": "21"
}
Phones (the account field is an secundary id):
{
"account": "3580654" ,
"id": "692e7e5f-85f2-444f-b6de-a2b1136b80fa" ,
"phone": "555-444.44.44",
"state": "21"
},
{
"account": "3580654" ,
"id": "079579aa-ece9-408f-9d00-889a1cb56fc4" ,
"phone": "555-432.33.33",
"state": "21"
}
so i want to join the query to have something like this:
{
"account": "3580654",
"id": "356ee84a-8eb5-4b9e-8af5-1cf1ebfe556d",
"name": "Jesus",
"lastname": "Omilon",
"state": 21,
"ip": "127.0.0.1",
"phones": ["555-444.44.44", "555-432.33.33"]
}
Can anyone helpme to do this? i try with eqJoin and map, but without success.
Thanks for your help.