code: protected Object lookupVar(JsonNode node, String var) {
  		List<? extends JsonNode> children = node.getChildren(var);
  		if (children.size()>1) { // multiple with name, treat as list of values
  			List<String> result = new ArrayList<String>();
  			for (JsonNode child : children) {
  				result.add(child.getValue());
  			}
  			return result;
  		} else if (children.size()==1) {
  			JsonNode child = children.get(0);
  			List<String> attributeNames = child.getAttributeNames();
  			Collections.sort(attributeNames);
  
  			if (attributeNames.size()==0) { // treat child as the attribute value
  				return child.getValue();
  			} else { // treat child as object with map values
  				Map<String, String> result = new LinkedHashMap<String, String>();
  				for (String attrName : attributeNames) {
  					result.put(attrName, child.getAttribute(attrName));
  				}
  				return result;
  			}
  		} else { // return null
  			return null;
  		}
  	}
docs: Return an Object that is either String or List<String> or Map<String, String>
  @param var maybe null if not found
  @return