I'm using axios to call APIs I received an API without patterns, and the return is:
{
"pedidos": [
{
"cnpj": "09922334480001",
"nr-pedido": "1234567",
"os-cliente": "811",
"data-entrada": "2020-08-03",
"previsao-entrega": "2020-09-28",
"status": "Em processo"
}
]
}
When i parse JSON i use:
result.data.pedidos[0].status;
but when i have "-" in fields how can i call? When i use:
result.data.pedidos[0].previsao-entrega
the error is returned.
Anyone can help me?