This is very similar to this other SO question about arrays.
If I evaluate:
y = {a: 1, b: 2, "momomomo": function() { return "hi"; }, zz: "wham"}
in a Javascript script instantiated via JSR223 (ScriptingEngine), I get a NativeObject
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.
Seems like JSR223 should have included language-agnostic access methods to ScriptingEngine to provide the ability to wrap a returned object as a List<Object>
for arrays or a Map<String, Object>
for associative arrays.
Any suggestions?