Say I have the following JSON file:
{"attributes":
{
"blue":true,
"red":false,
"green":true,
"webAtt":
{
"webColor": "#EF5689",
"webSafe":true
}
}
}
but lets also say I do not know any JSON nodes except "attributes". How would I go about finding which attributes are true? Is this even possible? If not, must it be hardcoded for each child node of "attributes"?
I would like this done in JavaScript if possible.
EDIT: There is a reason why webAtt is there and its because I want to get "websafe" and not "webAtt" when sweeping.