I had been stuck trying to access elements in an byte array. I was using log.info to understand the array elements the code log.info "xarray[2] $xarray[2]" (see below) would log the whole array then the [2] as seemingly another log output.
Further below I found I could access my array element using an intermediate variable.
The Question is:
Is there a special syntax for using array[i] in log.info or is just not a valid operation?
Thanks
John
log.info "length $xarray.length"
log.info "xarray[2] $xarray[2]"
Results in :
log.info "length $xarray.length"
byte atest = xarray[2]
log.info "xarray[2] $atest"
Works correctly, results in: