I am calling a JavaScript function using the rhino API:
Function fct = context.compileFunction(scope, script, "script", 1, null);
Scriptable result = (Scriptable) fct.call(
context, scope, attrs, new Object[0]);
Object obj = result.get("objectClass", result);
Now, how can I test if the value of the “objectClass” property is an array?
This might give you some idea: Declare a function to determine whether an object is an array and call that function passing your object.