Ah -- Thanks for catching my errors!
I think, if I were in your shoes, I might take the concept that you just perfected, and make dedicated CF for it, e.g. something like JSONGetElementCaseInsensitive( JSON, Key ).
Then, that could be used either in a While calc or a looping script, and the code could still be pretty readable.
If you feel like it, you are welcome to a custom function I once wrote one morning just to test myself to see how long it would take me. It's called: FlattenJsonObject.
Essentially, you feed it a JSON object, and a format parameter, and it returns you various flattened versions of the data. It only works on JSON objects - not on arrays.
A few examples using the JSON that you posted above look like this:
I never got around to sharing this function because I did not feel there would be much demand for it. It was mostly just a diversion for a morning. But -- I could see that it could apply to your situation because it can hand you a list of paths that you could then process using the FilterValues approach.
It's yours if you care to use it, but no offense taken at all if it feels better to roll your own.
All the best.
-Steve


