title: tuple indices must be integers or slices, not tuple
body: <p>I'll try to make a JSON</p>
  <pre><code> for i in ktg_mhs:       
          chart_ktg ={
              'value' : ktg_mhs[i][1],
              'name' : ktg_mhs[i][0]
          }
          result.append(chart_ktg)
      
      data = json.dumps(chart_ktg)
  </code></pre>
  <p>but, I get an error at this</p>
  <pre><code>'value' : ktg_mhs[i][1],
  'name' : ktg_mhs[i][0]
  </code></pre>
  <p>How to solve it and why?</p>
  <p>I have this input :</p>
  <pre><code>(('Coding', 51), ('Database', 27), ('UI/UX', 223), ('Manajemen', 34), ('Dasar Sistem Informasi', 7), ('Bisnis', 64), ('Kesehatan', 18), ('Lain-lain', 235))
  </code></pre>
  <p>And I want to make JSON like this :</p>
  <pre><code>{
              value: 335,
              name: 'Coding'
              }, {
              value: 310,
              name: 'Database'
              },
  </code></pre>
  <p>I try this :</p>
  <pre><code>result = []
             
      chart_ktg =[
      {
          'value' : ktg_mhsi[1],
          'name' : ktg_mhsi[0]
      }
          for ktg_mhsi in ktg_mhs
      ]
          # result.append(chart_ktg)
      data = json.dumps(chart_ktg)
  </code></pre>
  <p>And  the output like this :</p>
  <pre><code>[{&quot;value&quot;: 51, &quot;name&quot;: &quot;Coding&quot;}, {&quot;value&quot;: 27, &quot;name&quot;: &quot;Database&quot;}, {&quot;value&quot;: 223, &quot;name&quot;: &quot;UI/UX&quot;}, {&quot;value&quot;: 34, &quot;name&quot;: &quot;Manajemen&quot;}, {&quot;value&quot;: 7, &quot;name&quot;: &quot;Dasar Sistem Informasi&quot;}, {&quot;value&quot;: 64, &quot;name&quot;: &quot;Bisnis&quot;}, {&quot;value&quot;: 18, &quot;name&quot;: &quot;Kesehatan&quot;}, {&quot;value&quot;: 235, &quot;name&quot;: &quot;Lain-lain&quot;}]
  </code></pre>