I am trying to insert in node multiples values to the Azure Storage Table but only the last value is added. Is it something related to node synchronous or asynchronous mode (I am newbie in node)?
Code snippet:
...
for (var i = 0; i < 21; i++) {
var emissao = newData[keys[i]].emissao;
var codigoProduto = newData[keys[i]].codigoProduto;
var quantidade = newData[keys[i]].quantidade;
context.bindings.outputTable = {
"PartitionKey": "08755044001539",
"RowKey": i.toString(),
"Emissao": emissao,
"CodigoProduto": codigoProduto,
"Quantidade": quantidade
}
}
context.done();
project.json
{
"bindings": [
{
"name": "myTimer",
"type": "timerTrigger",
"direction": "in",
"schedule": "0 */5 * * * *"
},
{
"type": "table",
"name": "outputTable",
"tableName": "outTable",
"connection": "detfunction9451_STORAGE",
"direction": "out"
}
]
}