This is a very strange error, I can´t figure out why it´s happening.
I have a dataLayer array that has objects inside it.
dataLayer[3]
Object {event: "gerar-evento", event-category: "Chat", event-acion: "Vendas", event-label: "Pré Fixo 15"}
When I try to select a property of this object I get an error
if I try:
dataLayer[3].event //gerar-evento
it works fine.
But if I try:
dataLayer[3].event-label // ReferenceError: label is not defined
I get this error: ReferenceError: label is not defined
Is there a another way to select a property from a object? What I´m doing wrong?