4
I have a JSON and need to know the name of my object and the values it has, for example:
{"Pessoas" :
[
{"Nome": "Welson Play", "Idade":19},
{"Nome": "Stephanie", "Idade":15},
{"Nome": "João Pedro", "Idade":17}
]
}
I needed to pick up the code the name Pessoas and the values that each person has, but that without knowing the name, for example, could be Animais, Carros. This due to my table on BD the columns may vary, ie navigate by JSON.
Do you want the solution in PHP? I think I answered wrong in javascript. =(
– Fernando Leal
Hi @Fernando thanks for answering, can be in PHP tbm, I need to analyze the codes and see which one I will use, if you can help me with PHP I appreciate
– Furlan
Ok! I will remove my answer, PHP not very much to mine, hehe. And I think Sergio has already responded well in PHP. I didn’t notice the tags before I answered, sorry!
– Fernando Leal