title: How to add new json field to existing json in groovy
body: <p>My existing Json looks like:</p>
  
  <pre><code>def json_req = "{\"date\":\"Tue, 06 Oct 2015 09:10:52 GMT\",\"nonce\":\"6cm7PmwDOKs\",\"devId\":\"&lt;value&gt;\",\"appId\":\"&lt;value&gt;\"}
  </code></pre>
  
  <p>Perform the operation I can get <code>sig</code> field with value. I need to append this additional field with value as below:</p>
  
  <pre><code>"sig":"&lt;value&gt;"
  </code></pre>
  
  <p>So that the new json looks like:</p>
  
  <pre><code>def json_req = "{\"date\":\"Tue, 06 Oct 2015 09:10:52 GMT\",\"nonce\":\"6cm7PmwDOKs\",\"devId\":\"&lt;value&gt;\",\"appId\":\"&lt;value&gt;\",\"sig\":\"&lt;value&gt;\"}"
  </code></pre>
  
  <p>Within the same script can I append this new parameter with the value in json?</p>