We are passing around large octet sequences. The good news is that we can access the data through the getJson API. The data comes across as an array of strings that represent the bytes. Thus to get the actual byte Array we have to map the resulting values like this:
var stringdata = input.samples.getJSON(i).payload;
// Convert the ["0x81","0x25"...] to [0x81, 0x25]
var data = stringdata.map(function(item){return Number(item)});
It would be nice to have a way to get the octet sequence directly from the API to avoid the cast to and from JSON string, such as:
var data = input.samples.getByteArray(i,"payload");