title: How to send Javascript map as a parameter from lightning component to Apex server controller?
body: <p>I have a salesforce lightning component which enqueues server side action. To that action I need to pass a map as one of the parameters, but it looks like it takes memory address of the object instead.</p>
  
  <p>The client side code that creates the map and calls the server side action:</p>
  
  <pre><code>var action = cmp.get("c.save");
  var mapToSend = new Map()
  for (var key of valueMap.keys()) {
      mapToSend.set(key, valueMap.get(key))
  }
  action.setParams({
      "name": cmp.get("v.name"),
      "params": mapToSend
  });
  </code></pre>
  
  <p>In the controller then: </p>
  
  <pre><code> public static Boolean save(String name, Map&lt;String, Object&gt; params) {
  </code></pre>
  
  <p>log of the javascript shows nice <code>Map</code> with all the correct fields, but salesforce system log shows just</p>
  
  <pre><code>14:55:16.0 (3172304)|VARIABLE_SCOPE_BEGIN|[41]|name|String|false|false
  14:55:16.0 (3188041)|VARIABLE_ASSIGNMENT|[41]|name|"Account"
  14:55:16.0 (3191758)|VARIABLE_SCOPE_BEGIN|[41]|params|Map&lt;String,ANY&gt;|true|false
  14:55:16.0 (3204719)|VARIABLE_ASSIGNMENT|[41]|params|{}|0x30d2397a
  </code></pre>
  
  <p>Any Idea why? What those <code>|false|false</code> and  <code>|true|false</code> mean in the logs?</p>