how to merge two pouch DB data as in one couch DB

222 Views Asked by At

This is my Pouch DB data for user "A"

{"people": [{"id": 1,"dept_id": 3,"user": "A",},{"id":2 ,"dept_id": 1,"user": "B",},{"id": 3,"dept_id": 1,"user": "C",}]}

This is my pouch DB data for user "B"

{"people": [{"id": 1,"dept_id": 1,"user": "A"},{"id":2 ,"dept_id": 4,"user": "B"},{"id": 3,"dept_id": 1,"user": "C"}]}

When updating both on the couch, last updated DB content either "A"s DB or "B"s DB which are updated last is stored in Couch. I couldn't merge these to in couch DB. Is it possible to perform partial document updates?? Please help me. I'm new to this pouch and couch DB.

0

There are 0 best solutions below