[ { "operation":"shift", "spec":{ "*":{ // #2 means go three levels up the tree (count from 0), // and ask the "ratings" node, how many of it's // children have been matched. // // This allows us to put the Name and the Value into // the same object in the Ratings array. "$":"[#2].key", "@":"[#2].value" } } } ]