title: Creating a .net like dictionary object in Javascript
body: <p>I want to create a object in JavaScript which will store values in key, value pair and I should be able to pass some key and should be able to get its value back. In .NET world we can use dictionary class for this kind of implementation. Do we have any option in JavaScript world? I am using ExtJs 4.1, so if you know of any option in ExtJS even that would work.</p>
  
  <p><em>I have tried something like this but I cannot get value by key.</em></p>
  
  <pre><code>var Widget = function(k, v) {
      this.key = k;
      this.value = v;
  };
  
  var widgets = [
      new Widget(35, 312),
      new Widget(52, 32)
  ];
  </code></pre>