title: convert json from one form to another in python
body: <p>I have got a response after altering a list. My response looks something like this :</p>
  <pre><code>{
   &quot;response&quot;: [
      {
       &quot;timestamp&quot;: &quot;21:15-21:30&quot;,
       &quot;logs&quot;: [
           {
               &quot;exception&quot;: &quot;IllegalAgrumentsException&quot;,
               &quot;count&quot;: 1
           }
        ]
      },
      {
          &quot;timestamp&quot;: &quot;21:15-21:30&quot;,
          &quot;logs&quot;: [
           {
               &quot;exception&quot;: &quot;NullPointerException&quot;,
               &quot;count&quot;: 2
           }
       ]
     },..
  </code></pre>
  <p>I want the result to be something like this:-</p>
  <pre><code> &quot;response&quot;: [
       {
         &quot;timestamp&quot;: &quot;21:15-21:30&quot;,
         &quot;logs&quot;: [
            {
                &quot;exception&quot;: &quot;IllegalAgrumentsException&quot;,
                &quot;count&quot;: 1
            },
            {
                &quot;exception&quot;: &quot;NullPointerException&quot;,
                &quot;count&quot;: 2
            } ]
     }
  </code></pre>
  <p>How can I merge logs together like above in python?</p>