title: Is there a way to add/subtract all fields inside a JSON with another object with the same fields?
body: <p>I have a Mongoose.js schema, which looks like this:</p>
  
  <pre><code>{
    "City": String,
    "Year": String,
    "Population": Number,
    "Blah": Number,
    "Nested": {
      "Something": Number,
      "More stuff": Number 
    }
  }
  </code></pre>
  
  <p>Is there a convenient/best method to take two objects with these fields and add their number fields, or do I need to write a function to actually go in and do that?</p>
  
  <p>I'm dealing with a very large schema here. If I write a function to do this, I'll have to manually maintain it; meaning if I change the schema, I'll have to manually change the member function I define to add stuff.</p>