title: FOR loop in object/array
body: <p>I'm creating an application using python. I make a HTTP request and get a following  result:</p>
  
  <pre><code>{
      "companies": {
          "company": [
              {
                  "createDt": "2014-01-18T00:00:00+01:00",
                  "dbNazev": "sveatlo_s_r_o_",
                  "id": "1",
                  "licenseGroup": "null",
                  "nazev": "Sveatlo s.r.o.",
                  "show": "true",
                  "stavEnum": "ESTABLISHED",
                  "watchingChanges": "false"
              },
              {
                  "createDt": "2014-01-20T00:00:00+01:00",
                  "dbNazev": "hajocka",
                  "id": "2",
                  "licenseGroup": "null",
                  "nazev": "HÃ¡joÄka",
                  "show": "true",
                  "stavEnum": "ESTABLISHED",
                  "watchingChanges": "false"
              }
          ]
      }
  }
  </code></pre>
  
  <p>Then I'm processing the data in a for loop. the problem is that the response may also look like this:</p>
  
  <pre><code>{
      "companies": {
          "company": {
              "createDt": "2014-01-18T00:00:00+01:00",
              "dbNazev": "sveatlo_s_r_o_",
              "id": "1",
              "licenseGroup": "null",
              "nazev": "Sveatlo s.r.o.",
              "show": "true",
              "stavEnum": "ESTABLISHED",
              "watchingChanges": "false"
          }
      }
  }
  </code></pre>
  
  <p>Currently I'm checking if it is an array or not after each request like this, but I feel it's not the best way to do this. Could anybody please help me to find a better solution?</p>
  
  <p>Thanks for any answer.</p>
  
  <p>edit: I cannot change the server's response</p>