(nameKey is a string variable obtained elsewhere, appName is also a string. The masterJSON and appNameJSON items are JSONItem variables.)
Everything seems to be working, except for one problem… in some cases, the nameKey has a different case than what’s in the JSON data. For example, I may be given a key “APPNAME”, and have to match that to the “appName” key in the JSON data. In this case, my code fails.
I have also tried iterating over all items in masterJSON, using masterJSON.Name. I convert both nameKey and the string returned from masterJSON.Name to lowercase, and if they match, I call masterJSON.Child with the same index… and get on OutOfBoundsException on that call. No idea why.
[quote=124610:@Thomas Reed]Well, that worked perfectly, thanks!
I’ve gotta say, though, this JSONItem class needs a bit of work… it’s very unintuitive and quirky![/quote]
I’ve been doing a lot of work with the JSONItem class recently and I’ve come to think of it as very intuitive since you can use it as either an array or case-sensitive Dictionary, both of which are familiar concepts.