title: Modify JSON string comparing another JSON string
body: <p>I am trying to modify below JSON string #1  with the given information from JSON string #2 with ruby. Output should be like below string#3 (one key:value added and one key:value updated from String #2). After searching a lot I don't find any similar solution If anybody know please help</p>
  
  <p>Input String#1</p>
  
  <pre><code>{   "AC01": { "state": [ {"old": "112", "new": "100"} ],
                "temp": [{"old": "12","new": "200" }] },
      "AC02": { "state": [ {"old": "12","new": "120"}],
                "temp": [ {"old": "12","new": "220"}]}
  }
  </code></pre>
  
  <p>Input String#2</p>
  
  <pre><code>{   "AC01": { "state": [ { "new": "200", "time": "12212" } ] }
  }
  </code></pre>
  
  <p>output Json string should be like this:
  String #3</p>
  
  <pre><code>{   "AC01": { "state": [ {"old": "100", "new": "200","time": "12212"} ],
                "temp": [{"old": "12","new": "200" }] },
      "AC02": { "state": [ {"old": "12","new": "120"}],
                "temp": [ {"old": "12","new": "220"}]}
  }
  </code></pre>