code: public String getString(Map<String, Object> data, String attr) {
      Object value = data.get(attr);
      if (null == value) { return null; }
      if (!value.getClass().isArray()) { return value.toString(); }
      String[] values = (String[]) value;
      if (values.length == 1) {
        return values[0];
      } else {
        return Strings.join(values, ",");
      }
    }
docs: get parameter named attr
  
  @param attr a {@link java.lang.String} object.
  @return single value or multivalue joined with comma
  @param data a {@link java.util.Map} object.