title: Getting items from an api using django
body: <p>I am trying to get the amount value from the available field when I retrieve a blance from Stripe. I have the following response:</p>
  
  <pre><code>{
    "available": [
      {
        "amount": 10302,
        "currency": "cad",
        "source_types": {
          "card": 10302
        }
      }
    ],
    "livemode": false,
    "object": "balance",
    "pending": [
      {
        "amount": 0,
        "currency": "cad",
        "source_types": {
          "card": 0
        }
      }
    ]
  }
  </code></pre>
  
  <p>I am trying to get the available amount, so I wrote the following:</p>
  
  <pre><code>available = balance['available']
  </code></pre>
  
  <p>as a response I am getting the following:</p>
  
  <pre><code>[&lt;StripeObject at 0x110d45a98&gt; JSON: {
    "amount": 10302,
    "currency": "cad",
    "source_types": {
      "card": 10302
    }
  }]
  </code></pre>
  
  <p>But how can I get access to the 'amount' part?
  I tried:</p>
  
  <pre><code>amount = available['amount']
  </code></pre>
  
  <p>So I am receiving:</p>
  
  <pre><code>TypeError at /en/accounts/profile/
  list indices must be integers or slices, not str
  </code></pre>
  
  <p>as an error.</p>