Presenting my data structure:
var foo = {
"Category1": [
{"Company1": {"URL": ["DomainName1", "DomainName2"]}},
...
],
...
}
Typically, I access DomainName1 like this:
foo["Category1"][0]["Company1"]["URL"][0]
Now, I need to search all of foo
for a specific DomainName without any additional information. Using multiple nested loops would be too slow. Is there an efficient way to achieve this? I was considering replacing ["Category1"]
, [0]
, etc. with a wildcard symbol '*'
, but I'm unsure how to implement that.
Any suggestions or guidance on this matter would be highly valued.