In my Javascript code, I have an if
condition in my method that check if the parameters is an Array:
if (Array.isArray(value)) {
return true;
}
return null;
The value is a JSONArray
like this:
[{title: "james", author: "potter"}]
But always return null.
Is a JSONArray from Java, I am using Nashorn at Java 8 that allows you tu call Javascript methods from Java code.
What type should I use to return true?