title: How to return the matching results from Array of object based on an array of input values
body: <p>I have an array of objects like below </p>
  
  <pre><code>var item = [
      { "name": "John", "age": 30, "city": "New York1" },
      { "name": "John1", "age": 31, "city": "New York2" },
      { "name": "John2", "age": 32, "city": "New York3" },
      { "name": "John3", "age": 31, "city": "New York3" }
  ]
  </code></pre>
  
  <p>What I want is to get some of the age from this array of objects which has age property value 
  in <code>[30,31]</code></p>
  
  <p>So basically the input will be an array of integers like <code>var ageArray=[30,31];</code></p>
  
  <p>Example : </p>
  
  <p>Input : <code>[30,31]</code></p>
  
  <p>Output : Sum of the <code>age</code> of the below objects </p>
  
  <pre><code> { "name":"John", "age":30, "city":"New York1"},
   { "name":"John1", "age":31, "city":"New York2"},
   { "name":"John3", "age":31, "city":"New York3"}
  </code></pre>
  
  <p>So here it will be </p>
  
  <pre><code>92
  </code></pre>
  
  <p>I have tried to use filter for this but not sure how can i use <code>filter</code> with contains </p>
  
  <p>What I have tried is </p>
  
  <pre><code>var result = item .filter(obj =&gt; {
                      return obj.age..includes(ages);
                  })
  </code></pre>
  
  <p>Can someone help me to resolve this ? </p>