title: Looping through json array in python
body: <p>I have JSON in an array that i am importing into my script</p>
  
  <pre><code>"ip_address": [
  "192.168.0.1",
  "192.168.0.2",
  "192.168.0.3"
  ]
  </code></pre>
  
  <p>I am loading the JSON and declaring a variable titled ip_address.</p>
  
  <pre><code>data = yaml.load(message)
      for d in data: 
          ip_address = (d.get('ip_address'))
  </code></pre>
  
  <p>I am attempting to loop using python through the ip addresses.</p>
  
  <pre><code>for address in data['ip_address']:  
        print(address)
  </code></pre>
  
  <p>I am now getting an error that tells me </p>
  
  <pre><code>string indices must be integers, not str
  </code></pre>