cb function has an issue iterating through arrays where the elements are named......
using a microapp
input is
{
Names:["Joe","Peter","Pan"]
}
example which works :
JS code
`var namerecd = [];
for (var i=0;i<input.Names.length;i++) {
namerecd[i] = input.Names[i];
}
cb(null, {message: "this is the list " + namerecd });`
Output /Result
{
"message": "this is the list Joe,Peter,Pan"
}
example which does not work
JS Code
var namerecd = [];
for (var i=0;i<input.Names.length;i++) {
// the variable i has been replaced with the identifier "name" in the next line
namerecd["name"] = input.Names[i];
}
cb(null, {message: "this is the list " + namerecd });
cb function has an issue iterating through arrays where the elements are named......
example which works :
JS code
Output /Result
{ "message": "this is the list Joe,Peter,Pan" }
example which does not work
JS Code
Output/Result
{ "message": "this is the list " }