It's part of a proprietary application, so I can't post it fully, but the gist of the solution is converting the JSON input into a two-dimensional array, then parsing that array for a match.

Typical JSON is a collection of objects, referenced as "section.subsection.index.item" - subsection and index are optional and there can be multiple levels of subsections. "Index" represents an element in a sub-collection (an array of items) and can occur at any level.

Parsing the response, I turn it into a string in the first index of a 2-dimensional array - "root.computer.#.hostname", with the data in the second index - "My PC". I can then scan the array for an "object reference", which will return the data from the second index if the request is matched in the first index. - it returns a simple string with the data.

I can also make a request like "root.computer.*.hostname" and it will return a simple array of all the hostnames in the collection. It's smart enough to not match "root.computer.site2.*.hostname".

Finally, I can request the object reference "root.computer.3." - this will return a 2-dimensional array of Value:Data pairs - an entire business record - field name in the 0 index and data in the 1 index per row.

I don't think it can be considered "true" JSON parsing, but it gives me what I need in my application. I'm going to use a different function to return the structure, no data, if that becomes necessary. The part I struggled with is creating a true object reference. Once I saw how PowerShell was parsing it, I was able to develop a reasonable alternative.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D