I have a multidimensional object in javascript that I want to access and get a value of a specific property but when trying to get the value it gives me an error "Can not read property 0 of undefined", what is the error.
var objeto2 = {
nameKey: [{ nombre: "csrf_name", valor: "csrf5b91a8e01e786" }],
valueKey:
[{
nombre: "csrf_value",
valor: "e70a02a75a53e5934af65685897e0d71"
}]
};
var v1 = objeto2.namekey[0].valor;
var v2 = objeto2.valueKey[0].valor;