I make an API call, the result is msg.payload : Object, which contains an array with data. I am not interested in the data itself, only in the indexnumber of the array.
For example the result is the output below, I want to extract the number 4.
msg.payload : Object
{ data: array[4] }
The results differ, so one time it is { data: array[4] }, or { data: array[4=8] } (then I want to extract the 8), or { data: array[2] }, then I want to extract the 2.
So are you saying you are just interested in finding the total number of objects in the array that is returned - or are you looking for a specific payload/value and then want to know the index number for that ?