How can I get the results of executed javascript code from groovy? I tried the following, but I always get back the string "world". I would have expected an object or map.
import javax.script.ScriptEngineManager
import javax.script.SimpleBindings
def manager = new ScriptEngineManager()
manager.getEngineByName("JavaScript").eval("""
{hello: name}
""", [name:'world'] as SimpleBindings)