SPIN cast to java.lang.String

Hi Community,

I have simple JSON object stored as variable created by javascript

which contains http links


edit: I have created a fake api if u want to access the json above

which I am tryng to access with http-connector
and in the input Parameters section
in the URL part I have java script which tries to access the above json spin with the following code

var system = java.lang.System;

var json = execution.getVariable("oskarPaths");

var test = json.elements().get(0);
var test2 = test.prop("fullPathInitialise").value().toString;

system.out.println('fullPathInitialise: '+test2);


I have tried to change the value() to toString but still getting errors like
jdk.nashorn.api.scripting.ScriptObjectMirror cannot be cast to java.lang.String

Can you please give an advice how to access a prop from the json [].


It should be toString()

1 Like

I need glasses. thx