title: can we sort data for multiple field using javascript
body: <p>In my travel website (just like airbnb ), user can sort record by Availability ,Price ,Location etc...</p>
  
  <p>My website data ( record ) , where in json format only.I can't fetch record from the database.</p>
  
  <p>My Data Record : </p>
  
  <pre><code>var json = [
          {"id":"1","tagName":"apple",'lat':"37.764121333563985","lng":"-122.43083545083414",'cat':'bus','price':50},
          {"id":"2","tagName":"orange",'lat':"37.760390258066806","lng":"-122.40842161915589",'cat':'bus','price':50},
          {"id":"3","tagName":"banana",'lat':"37.76821074033546","lng":"-122.39946165364097",'cat':'car','price':70},
          {"id":"4","tagName":"watermelon",'lat':"37.76903501995947","lng":"-122.43674595206681",'cat':'bus','price':50},
          {"id":"5","tagName":"pineapple",'lat':"37.775329253488984","lng":"-122.42896304538613",'cat':'car','price':50},
          {"id":"6","tagName":"pineapple",'lat':"37.76808825514635","lng":"-122.42957791610439",'cat':'bus','price':30},
          {"id":"7","tagName":"pineapple",'lat':"37.764609542480706","lng":"-122.43126917941493",'cat':'bus','price':50},
          {"id":"8","tagName":"pineapple",'lat':"37.77486256468261","lng":"-122.40143099838457",'cat':'car','price':20},
          {"id":"9","tagName":"pineapple",'lat':"37.770304718740945","lng":"-122.42489358892846",'cat':'bus','price':50},
          {"id":"10","tagName":"pineapple",'lat':"37.7628338732316","lng":"-122.42631843030665",'cat':'car','price':10}
      ];
  </code></pre>
  
  <p>My Javascript Code : </p>
  
  <pre><code>$(json).each(function(i,marker){
      if (cat == marker.cat || price &lt;= marker.price) || ( price &lt;= marker.price &amp;&amp; cat == marker.cat){
       var content = 'MY DATA CONTENT USING MARKER';
       $('.result').append(content);  
     }
  });
  </code></pre>
  
  <p>My if condition is not working.</p>
  
  <p>Can any one help?</p>