code: public static JavaScriptObject convertMapToJsObject(Map<String, String> stringMap) {
  
          if (stringMap == null) {
              return null;
          }
          JSONObject json = new JSONObject();
          for (Map.Entry<String, String> entry : stringMap.entrySet()) {
              String key = entry.getKey();
              String value = entry.getValue();
              json.put(key, new JSONString(value));
          }
          return json.getJavaScriptObject();
      }
docs: Converts a map whose keys and values are strings to a Javascript object with the keys as attributes and the
  corresponding values as the attribute values.<p>
  
  @param stringMap the map to convert
  @return the Javascript object with the attributes defined by the map