Given this json response:
[
{
"diccioDatosForm": {
"errorMessage": "Verifique los datos invalidos ingresados...",
"encargadoLocalidad": "Ingrese un valor",
"responseStatus": "ERR",
"segundoNombre": "OK",
"encargadoProvincia": "Ingrese un valor"
}
},
{
"listaEncargados": []
}
]
I need to access the elements of the key ‘diccioDatosForm’.
When I print the json with an alert (alert(responseData)), I get:
[object Object],[object Object]
and I don’t get anything when trying to do this:
alert(responseData.diccioDatosForm.errorMessage)
Like this:
responseDataitself is an array contains of 2 elements