private Inspector getChildren(Inspector inspector) {
        if (inspector.type() == ARRAY){
            return inspector;

        } else if (inspector.type() == OBJECT){
            if (inspector.field("children").valid()) {
                return inspector.field("children");
            }
            if (inspector.field(1).valid()) {
                return inspector.field(1);
            }
        }
        return null;
    }
Translates a list of grouping requests on JSON form to a list in the grouping language form
container-search/src/main/java/com/yahoo/search/query/SelectParser.java