code: function map(arr) {
      var hm = new HashMap();
      Object.keys(arr).forEach(function(k) {
          hm.put(k, arr[k]);
      });
      return convert[syncMethodName("asScalaMap")](hm);
  }
docs: convert a js object into a map