title: JavaScript: How to create an Object and filter on those attributes?
body: <p>I have a JavaScript array of houses like so,</p>
  
  <pre><code>{
      "homes" : [{
          "home_id"         : "1",
          "address"         : "321 Main St",
          "city"            : "Dallas",
          "state"           : "TX",
          "zip"             : "75201",
          "price"           : "925",
          "sqft"            : "1100",
          "year_built"      : "2008",
          "account_type_id" : "2",
          "num_of_beds"     : "2",
          "num_of_baths"    : "2.0",
          "geolat"          : "32.779625",
          "geolng"          : "-96.786064",
          "photo_id"        : "14",
          "photo_url_dir"   : "\/home_photos\/thumbnail\/2009\/06\/10\/"
      }],
      ..........
  }
  </code></pre>
  
  <p>I want to provide 3 different search methods.</p>
  
  <p>How can I return a subset of this homes area array that has:</p>
  
  <ul>
  <li>The <code>price</code> between X and Y</li>
  <li>The <code>bathrooms</code> >= Z</li>
  <li>The # of <code>bedrooms</code> == A or == B or == C</li>
  </ul>
  
  <p>For example, how would I create the psuedo code like:</p>
  
  <pre><code>homes.filter {price &gt;= 150000, price &lt;= 400000, bathrooms &gt;= 2.5, bedrooms == 1 | bedrooms == 3}
  </code></pre>