title: interoperation between Rhino and Java via JSR223: working with Javascript Object instances
body: <p>This is very similar to <a href="https://stackoverflow.com/questions/1433382/how-to-convert-rhino-javascript-arrays-to-java-arrays">this other SO question about arrays</a>.</p>
  
  <p>If I evaluate:</p>
  
  <pre><code>y = {a: 1, b: 2, "momomomo": function() { return "hi"; }, zz: "wham"}
  </code></pre>
  
  <p>in a Javascript script instantiated via JSR223 (ScriptingEngine), I get a <code>NativeObject</code> of some sort (I see this in Eclipse's debugger) and have no idea how to access its properties. Furthermore I don't even know which .jar file, if any, I need to add to my build path to be able to work with the class in question, and if I find an approach that works in Rhino Javascript, it is useless for Jython.</p>
  
  <p>Seems like JSR223 should have included language-agnostic access methods to ScriptingEngine to provide the ability to wrap a returned object as a <code>List&lt;Object&gt;</code> for arrays or a <code>Map&lt;String, Object&gt;</code> for associative arrays.</p>
  
  <p>Any suggestions?</p>