I actually wrote something similar in nodejs for a data import system. Was very handy.

Interesting! Can you elaborate a little bit more on your implementation?

Mine was a bit more specific. I had a JSON object of data exported per account I was importing, and then a complex mapping (also JSON) of where to put each piece of data.

Therefore, I really wanted to know that I was actually pulling in all of the data I needed, so I tracked what was seen vs not seen, and compared against what was attempted to see.

In the end it was basically a wrapper around the JSON object itself, that allowed lookup of data via a string in "dot notation" (so you could do "keyA.key2" to get the same thing you would have directly in JSON. Then, it would either return a simple value (if there was one), or another instance of the wrapper if the result was itself an object (or an array or wrapped objects). All instances would share the "seen" list.

It's unfortunately locked behind NDA/copyright stuff, but the implementation was only 67 lines.

Nice very interesting, thank you very much for taking the time to explain a bit further