Another solution to navigate through JSON documents is JSONiq (implemented in the Zorba engine), where you can write something like:
jsoniq version "1.0";
let $doc := [
{"id":"10", "class": "child-of-9"},
{"id":"11", "class": "child-of-10"}
]
for $entry in members($doc) (: binds $entry to each object in turn :)
return $entry.class (: gets the value associated with "class" :)
You can run it on http://try.zorba.io/