export function onResults(input_result) {
if (input_result.tool_results[0].decodes.length === 0) { // do not process when there are no decodes
return {};
}
// mock the data for development and testing purposes, replace it with the actual data when possible
const mockedData = ["D21OCT21", "78B8D65C7DE9", "S21294520180521", "1PFS10-SR10F1-1C00W"];
//const orderedDecodes = input_result.tool_results[0].decodes // uncomment this line when we switch to actual data
//.map(decode => decode.value) // uncomment this line when we switch to actual data
const orderedDecodes = mockedData // remove or comment out this line when we switch to actual data
.sort()
.join(',');
return {
tcp_ip: orderedDecodes
};
}
}