title: Removing duplicates from JSON array by a value in each JSON object in array
body: <p><strong>If there are two JSON objects in an array with same value for a particular field, then I want to mark them as duplicate</strong>. I want to remove one of them. Similarly, when there are multiple duplicate, I only want to keep the last object(latest).If this is input:    </p>
  
  <pre><code>names_array = [
      {name: "a",  age: 15},
      {name: "a",  age: 16},
      {name: "a",  age: 17},
      {name: "b",  age: 18}
      {name: "b",  age: 19}];
  </code></pre>
  
  <p>I want the output to be</p>
  
  <pre><code>names_array_new = 
      {name: "a",  age: 17},
      {name: "b",  age: 19}];
  </code></pre>
  
  <p>I have searched for this but only found how to remove duplicates when entire objects are same.</p>