title: JavaScript. Dictionary Key is not a String?
body: <p>Just a simple question. Having the next piece of code:</p>
  
  <pre><code>  function addMarker(data) {
      var types = {'meet': 380 + ',' + 95, 'vegetable': 285 + ',' + 0};
      var selection = data.type;
  
      console.log(types["meet"]);
      console.log(types[selection]);
      console.log(selection);
  </code></pre>
  
  <p>and having these results in the console:</p>
  
  <pre><code>380,95
  undefined
  Meet
  </code></pre>
  
  <p>I'd need to have in the second case also a 380,95. <code>selection</code> is supposed to be a string coming from the <code>data</code> object. Somehow when using this string like a dictionary key it's not working. How could I do then to get different values from <code>types</code> in some dynamic way like this?</p>
  
  <p>Just to clarify, I'm not trying to get float numbers, what I need are two numbers separated by a <code>,</code></p>