prefix-keys
Take all the key-value pairs in an object and return a new object with the keys prefixed.
Useful for updating nested documents in MongoDB
install
npm install --save prefix-keys
Use
"use strict";var prefixKeys = ; var data = country: "CA" province: "ON"; var update = $set: ; var query = _id: userId; dbusers;