I want to make a check-conditionif()-case if the Buffer Array is filled, then continue, if not do something else. But Javascript has got me on its finest.
If I try to log the whole object with the BufferArray containing, it logs:
{"type":"Buffer","data":[137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,1,94,0,0,1,94,8,2,0,0,0,66,73,224,77,0,0,80...]
When I now try to log only the buffer array like so:
logger.info('Data is: ' + JSON.stringify(someObj.data))
The result is:
Data is: undefined
What are we doing wrong here? And how can i If-check if a buffer-array is empty or has data?