title: Rhino setting a NativeObject property in java
body: <p>I have a javascript script which when evaluated returns a NativeObject</p>
  
  <pre><code>obj = context.evaluateString(scope,"({age:3, name:'bob'})", "&lt;source"&gt;, 1, null)
  </code></pre>
  
  <p>I then cast obj as either a NativeObject or Map and then run the put method</p>
  
  <pre><code>castObj.put("surname","smith")
  </code></pre>
  
  <p>And I get an java.lang.UnsupportedOperationException thrown.  Is there another way I can change the object value?</p>