You should remove it, then create another class extending JavaScriptObject, let's say "MyObject", containing the desired fields (here, "id"), and then do this:
Node myNode= ....
MyObject myObject = myNode.cast();