title: json data check if same id repeat
body: <p>I have a json data there one id has different color_id.
  So from there I just want to check if same id repeat then just keep first one</p>
  
  <p>Here is my sample JSON</p>
  
  <pre><code>var data= [{ "id": "1", "name": "xxx", "age": "22","color_id": "22" },
      { "id": "1", "name": "yyy", "age": "15","color_id": "1" },
      { "id": "5", "name": "zzz", "age": "59","color_id": "22" }];
  </code></pre>
  
  <p>My desired output</p>
  
  <pre><code>var data= [{ "id": "1", "name": "xxx", "age": "22","color_id": "22" },
      { "id": "5", "name": "zzz", "age": "59","color_id": "22" }];
  </code></pre>
  
  <p>I tried reduce but there I found that modify data structure so I am not sure that I will get my desired output or not.</p>