title: Working with JSON Merge Patch
body: <p>I have an angular based application with node at the backend.
  I am working with JSON Merge Patch to handle data updation on multiple tables.</p>
  
  <p>I am using this npm package to generate patches by comparing the original data and the updated data I receive from the frontend. It returns something like the following:</p>
  
  <pre><code>{ op:"replace", path="/firstName", value:"Albert"},
  { op:"replace", path="/contactDetails/phoneNumbers/0/number", value:"123"},
  { op:"add", path="/contactDetails/phoneNumbers/1", value:{number:"456"}}];
  </code></pre>
  
  <p>It gives me the list of operations I need to perform on the different tables. 
  I iterate over these patches and find out the tables I need to update as follows:</p>
  
  <p>I haven't really built anything so far but here's how I am going to proceed.</p>
  
  <pre><code>_.each(patches, function(patch){
  switch(patch.op)
  {  
     case 'add': 
     var table = patch.path.split('/')[1];
     var value = patch.value
     break;
     case 'replace':
     //so forth
     break;
     case 'remove':
     //so forth
     break;
  }
  });
  </code></pre>
  
  <p>Here's what I'd like to know:
   1. Is there any better way to handle JSON Updation with multiple tables?
   2. Is there any better way to handle JSON Merge Patches for SQL updates?
   3. Is there any existing package/tool which makes this process simpler?</p>