Is there a way in java (Springboot app) - to invoke NodeJs script file, - pass java object to the script and modify that object in the js script. - And return back the modified object
for example as below.
class Services
{
Address address = new Address(....);
/*
invoke NodeJs script and pass address object
in the js script modify address object
var address = getAddress()
modify address object
return address object back to java calling class
setResultObject(address) or return address;
*/
address = invokeJS("nameOfScriptWithLocation", address);
System.out.println("modified address" + address.toString()
}