working through a large json that has multiple arrays that can move around in order.
{
"person": {
"Clark": [
{
"lastName": "Kent",
"job": "Reporter",
"roll": 20,
"weaknesses": [
"kryptonite",
"Lois"
]
},
{
"alterEgo": "Superman",
"powers": [
"strength",
"lasereyes",
"hair"
]
}
],
"Bruce": [
{
"lastName": "Wayne",
"job": "Playboy",
"roll": 30,
"weaknesses": [
"cats",
"clowns"
]
},
{
"alterEgo": "Batman",
"powers": [
"fighting",
"gadgets",
"money"
]
}
],
"Peter": [
{
"alterEgo": "Spiderman",
"powers": [
"strength",
"arm-goo",
"wit"
],
"weaknesses": [
"midterms",
"girls"
]
},
{
"lastName": "Parker",
"job": "Photographer",
"roll": 40
}
]
}
}
The powers and / or weaknesses each move around and either could be in [0] sometimes [1] sometimes [53] etc. How can I search for persons[0].weakness if if I don't know which array its in? I know its there just don't know where. Thanks for the time.