Javascript – Counting instances of a key in a JSON tree
I have a JSON structure in the likes of { "a": {"b": "value"}, "c": {"b": "value"}, "d": {"b": "value"}, "a": {"e": {"b": ["value"]}} } The expected answer is 4. b could be anywhere in the tree structure. I want to…