title: Ignore duplicate keys in JSONObject
body: <p>I have a String which is in JSON Format</p>
  
  <pre><code>String str = "{\"innerkey1\":\"innervalue1\",
  \"innerkey2\":\"innervalue2\",\"innerkey1\":\"innervalue3\"}";
  </code></pre>
  
  <p>When I am trying to create a object from this string</p>
  
  <pre><code>try  {
      JSONObject obj = new JSONObject(str); 
  } catch(Exception e) {
       e.printStackTrace();
  }
  </code></pre>
  
  <p>I am getting an error</p>
  
  <pre><code>org.json.JSONException: Duplicate key "innerkey1"
  </code></pre>
  
  <p>Is there any way we can create the JSONObject by ignoring the last key from the string?</p>