0
I was trying to access a JSON with JS, here’s a example how they are:
{
status: "0",
ano: "Não Informado",
competencia: "Não Informado",
id_Publication: "8"
}
But actually this is only one part of the full JSON. This is "a multidimensional array". How can I access information within p, more specifically the part of competence?
I’ve tried using that code:
{
targets: 7,
data: "",
render: function(data, type, full){
returnconsole.log(full);
}
}
It returns all the JSON if use this way and put:
{
targets: 7,
data: "",
render: function(data, type, full){
returnconsole.log(full['p']);
}
}
It returns the data only from p, BUT if I try to put:
{
targets: 7,
data: "",
render: function(data, type, full){
returnconsole.log(full['p.competencia']);
}
}
He returns Undefined.
This JSON is not valid. It corrects the same so that we can answer, it is very confused, validates it here: https://jsonformatter.curiousconcept.com/
– Leonardo Bonetti
It is valid yes, it works here, this is an example, how can I access it? @Leonardobonetti
– User564816
Now yes is valid. I will post the answer !
– Leonardo Bonetti