title: JSON-Simple. Append to a JSONArray
body: <p>I am using the JSON-simple library to parse the Json format. How can I append something to a JSONArray? For e.g. consider the following json</p>
  
  <pre><code>{
      "a": "b"
      "features": [{/*some complex object*/}, {/*some complex object*/}]
  }
  </code></pre>
  
  <p>I need to append a new entry in the <code>features</code>. 
  I am trying to create a function like this:-</p>
  
  <pre><code>public void appendToList(JSONObject jsonObj, JSONObject toBeAppended){
  
      JSONArray arr = (JSONArray)jsonObj.get("features");
  
      //1) append the new feature
      //2) update the jsonObj
  }
  </code></pre>
  
  <p>How to achieve steps 1 &amp; 2 in the above code?</p>