title: Combining two JSON objects in to one
body: <p>I have two JSON objects. One is python array which is converted using json,dumps() and other contains records from database and is serialized using json serializer. I want to combine them into a single JSON object. </p>
  
  <p>For eg: </p>
  
  <pre><code>obj1 = ["a1", "a2", "a3"]
  
  obj2 = [{
      "pk": "e1",
      "model": "AB.abc",
      "fields": {
        "e_desc": "abcd"
      }
    },
    {
      "pk": "e1",
      "model": "AB.abc",
      "fields": {
        "e_desc": "hij"
      }
    }
  ]
  </code></pre>
  
  <p>I want to merge them into single object as below:</p>
  
  <pre><code>finalObj = {
    obj1: ["a1", "a2", "a3"],
    obj2: [{
        "pk": "e1",
        "model": "AB.abc",
        "fields": {
          "e_desc": "abcd"
        }
      },
      {
        "pk": "e1",
        "model": "AB.abc",
        "fields": {
          "e_desc": "hij"
        }
      }
    ]
  }
  </code></pre>
  
  <p>How can i do this?</p>