I may be new to coding, but I've hit a roadblock and can't seem to find the solution - despite numerous attempts on Google and StackOverflow.
Behold, a JSON object:
const json = {
"catalog:aardvark": {
"severity": "minor"
},
"catalog:baboon": {
"severity": "minor",
"testDependency": "dashboard:echidna"
},
"catalog:capybara": {
"severity": "minor",
"testDependency": "dashboard:ferret"
},
"dashboard:dingo": {
"severity": "minor"
},
"dashboard:echidna": {
"severity": "minor"
},
"dashboard:ferret": {
"severity": "minor"
}
}
My challenge is to retrieve the key "catalog:capybara"
using either the key "testDependency"
or the value "dashboard:ferret"
. The other inputs are not known for this purpose.
I've attempted various methods without success, and while it seems simple, I'm seeking guidance and assistance. Your help would be greatly appreciated!
PS: Don't let the colons in the keys and values confuse you.