I need to access a json object as if it were an array, Example I have the following object on the client side:
´ remessa : function (){
var arr2 = [{
'NrSequenciaDoc' : '7777',
'TipoOcorrencia' : '1',
'NossoNumero' : '66688',
'NumeroDocumento' : '6987',
'DataVencimento' : '30082017',
'SacadoUF' : 'UF', },
{
'NrSequenciaDoc' : '7777',
'TipoOcorrencia' : '1',
'NossoNumero' : '66690',
'NumeroDocumento' : '6987',
'DataVencimento' : '30082017',
'SacadoUF' : 'UF', }];
axios({
method: 'post',
url: '/server/remessa',
params: {
Nrbanco : '085',
TipoInscricao : '1',
IncricaoCedente : '06624079975',
...
Detalhe : arr2
...
,
}
}).then(function (response)
{
console.log('response.data' + response.data)
}).catch(function (error) {
console.log(error)
})
}
and on the server and I have 'var arr = req.query.Detalhe;
for (i in arr) { console.log (arr [i] .NossoNumber); } '
It is not working, it appears undefined in the console;