As someone who is just starting to learn code, I apologize if my question seems trivial.
I have a nested object database that I need to search for a character name and retrieve the corresponding owner of that character. Unfortunately, all the solutions I've come across so far only address searching at the top level or are specifically designed for arrays, leaving me feeling stuck and out of options. Is it possible to perform a deep search for a name like 'Farah' within the database and then somehow link it back to 'olis characters'?
Thank you in advance for any guidance or tips you may be able to provide!
{
"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
}
}
}