title: Get JSON keys with values
body: <p>I have been trying to get the key and value of my JSONObject. I have no idea why this isn't working, because String key is clearly a string?</p>
  
  <p>My code:</p>
  
  <pre><code>JSONObject obj = new JSONObject(historie2.getData());
              Iterator&lt;?&gt; keys = obj.keys();
  
              while(keys.hasNext()) {
                  String key = (String)keys.next();
                  String value =  obj.getString(key); //This is where the error comes
  
              }
  </code></pre>
  
  <p>The JSONObject:</p>
  
  <pre><code>{
      "relatie_website": ["www.apple.com"],
      "relatie_kvknummer": ["NL3234234"],
      "relatie_naam": ["Apple international inc."],
      "relatie_d400code": [null],
      "relatie_zoeknaam": ["APPLE INC"],
      "relatie_debiteurnummer": ["3523523"],
      "relatie_btwnummer": ["332342"]
  }
  </code></pre>
  
  <p>This is the error I have been getting:</p>
  
  <blockquote>
    <p>org.json.JSONException: JSONObject["relatie_website"] not a string.</p>
  </blockquote>