PouchDb - Remove Object Inside Document
I'm an Italian PouchDb and AngularJS Developer. My json document is: { '_id': '6', '_rev': '3-f7283d7683cd6fb15753f494aad1d49f', 'name': 'Ivrea', 'owners': [ {
Solution 1:
You just need to put()
the main document back in the database after you remove an object from it. :)
db.get('foo').then(function (doc) {
delete doc.whatever;
return db.put(doc);
}).catch(function (err) { /* ... */ });
Post a Comment for "PouchDb - Remove Object Inside Document"