title: Select from array of objects based on property value in JavaScript
body: <p>I have JSON objects that have several properties such as an id and name. I store them in a JavaScript array and then based on a dropdownlist I want to retrieve the object from the JavaScript array based on its id.</p>
  
  <p>Suppose an object has id and name, how do I select them from my array variable?</p>
  
  <pre><code>var ObjectsList = data;
  var id = $("#DropDownList &gt; option:selected").attr("value");
  ObjectsList["id=" + id];
  </code></pre>