const jsonpatch = require('fast-json-patch');
const userStore = {name: "omar", locations: {businesses: []}};
const patch = [{op: 'remove', path: '/locations/businesses'}];
console.log('Before: ', userStore);
const result = patch.reduce(jsonpatch.applyReducer, userStore);
console.log('After: ', result);