title: How to filter the data from array using javascript/jquery?
body: <p>I have declared an array as  <code>var user_profile = [];</code> and I have already some pushed data in array which contains :</p>
  
  <pre><code>[  
     {  
        "assessmentType":"FINAL",
        "assessCatId":-1,
        "assessReason":"2",
        "assessAmount":"",
        "assessTotal":null
     },
     {  
        "assessmentType":"FINAL",
        "assessCatId":-1,
        "assessReason":"2",
        "assessTotal":null
     },
     {  
        "assessmentType":"FINAL",
        "assessCatId":-1,
        "assessReason":"",
        "assessTotal":null
     },
     {  
        "assessmentType":"FINAL",
        "assessCatId":0,
        "assessReason":null,
        "assessAmount":"",
        "assessPenalty":"",
        "assessTotal":0
     },
     {  
        "assessmentType":"FINAL",
        "assessCatId":0,
        "assessReason":null,
        "assessTotal":null
     },
     {  
        "assessmentType":"FINAL",
        "assessCatId":0,
        "assessReason":"",
        "assessTotal":null
     },
     {  
        "assessmentType":"FINAL",
        "assessCatId":0,
        "assessReason":"",
        "assessTotal":null
     },
     {  
        "assessmentType":"FINAL",
        "assessCatId":0,
        "assessReason":"2075-09-09",
        "assessAmount":"2075-09-17",
        "assessTotal":null
     },
     {  
        "assessmentType":"FINAL",
        "assessCatId":0,
        "assessReason":"2075-09-09",
        "assessTotal":null
     },
     {  
        "assessmentType":"FINAL",
        "assessCatId":0,
        "assessReason":"2075-09-17",
        "assessTotal":null
     },
     {  
        "assessmentType":"FINAL",
        "assessCatId":1,
        "assessReason":"",
        "assessAmount":"0",
        "assessPenalty":"0",
        "assessTotal":0
     },
     {  
        "assessmentType":"FINAL",
        "assessCatId":2,
        "assessReason":"",
        "assessAmount":"0",
        "assessPenalty":"0",
        "assessTotal":0
     },
     {  
        "assessmentType":"FINAL",
        "assessCatId":3,
        "assessReason":"",
        "assessAmount":"0",
        "assessPenalty":"0",
        "assessTotal":0
     },
     {  
        "assessmentType":"FINAL",
        "assessCatId":1,
        "assessReason":"A",
        "assessAmount":"1",
        "assessPenalty":"2",
        "assessTotal":3
     },
     {  
        "assessmentType":"FINAL",
        "assessCatId":2,
        "assessReason":"B",
        "assessAmount":"3",
        "assessPenalty":"4",
        "assessTotal":7
     },
     {  
        "assessmentType":"FINAL",
        "assessCatId":3,
        "assessReason":"C",
        "assessAmount":"5",
        "assessPenalty":"6",
        "assessTotal":11
     }
  ]
  </code></pre>
  
  <p>I only need the data in array whose <strong>assessCatId=1,2,3 and assessReason is not Empty</strong> . So I tried by filtering it:</p>
  
  <pre><code>const output = user_profile.filter(({ assessCatId,assessReason })  =&gt; assessCatId != 0 || assessReason != 'empty');
              console.log("here the outpuit is");
              console.log(output)  ;
  </code></pre>
  
  <p>But it is not filtering the array.Still every data is coming in the array.How can i manage this array to filter the data?</p>