1.0.0 • Published 6 years ago
jsonpatch-to-mongodb v1.0.0
jsonpatch-to-mongodb
Convert JSON patches into a MongoDB update.
Example
var toMongodb = require('jsonpatch-to-mongodb');
var patches = [{
op: 'replace',
path: '/name',
value: 'dave'
}];
console.log(toMongodb(patches));
// {'$set': {name: 'dave'}};Example: with express and mongoose
Install
npm install --save jsonpatch-to-mongodbTest
npm testLicense
MIT
