Is it possible to get the length of a json/spin list ?
json.prop("array").elements()
or a simple solution to check if the array is empty or contains elements?
Another question: I work with the REST API to get some input (JSON-String) - values to can work in the Camunda Modeler. To use them i have to convert the values by using Camunda Spin S(json).
To navigate through the json tree, always i have to do this “prop” notation …
is there some easier way to get the normal syntax of a json in JavaScript?
do stuff like this: json.array[0].name ... json.array.length ... json.object.subObject.list
Since Camunda Spin API strangely needs to use JavaScript’s JSON.parse to get array length, I found a good enough workaround that doesn’t require JavaScript: