I am pretty new to learning to code. So sorry if this is a stupid question.
I have a nested object database that I want to search for a character name and then return to me who's character it is. But, so far, I can only find solutions that search the top level objects or are for arrays and I am running out of ideas. Is it possible to search in depth for a name like 'Farah' and then somehow get 'olis characters' back?
Thanks in advance for any advice you guys might have!
{
"olis characters": {
"0": {
"name": "Farah",
"class": "rogue",
"level": 74
},
"1": {
"name": "Grop",
"class": "paladin",
"level": 31
},
"2": {
"name": "Skolmr",
"class": "druid",
"level": 85,
}
},
"chris characters": {
"0": {
"name": "Trygve",
"class": "bard",
"level": 28
},
"1": {
"name": "Brusi",
"class": "rogue",
"level": 10
},
"2": {
"name": "Steini",
"class": "skald",
"level": 58
}
}
}