private boolean isMap(Inspector array) {
            Inspector firstObject = array.entry(0);
            if (firstObject.type() != Type.OBJECT) return false;
            if (firstObject.fieldCount() != 2) return false;
            if (! firstObject.field("key").valid()) return false;
            if (! firstObject.field("value").valid()) return false;
            return true;
        }
Returns true if the given array represents a map - a list of pairs called "key" and "value"
container-search/src/main/java/com/yahoo/prelude/hitfield/XmlRenderer.java