code: public Object get(Map<String, Object> data, String name) {
      Object value = data.get(name);
      if (null == value) return null;
      if (value.getClass().isArray()) {
        Object[] values = (Object[]) value;
        if (values.length == 1) { return values[0]; }
      }
      return value;
    }
docs: get parameter named attr
  
  @param data a {@link java.util.Map} object.
  @param name a {@link java.lang.String} object.
  @return a {@link java.lang.Object} object.