title: Update Array Value of same Key
body: <pre><code>var family = [
    {
      name: &quot;Mike&quot;,
      age: 10
    },
    {
      name: &quot;Matt&quot;
      age: 13
    },
    {
      name: &quot;Nancy&quot;,
      age: 15
    },
    {
      name: &quot;Adam&quot;,
      age: 22
    },
    {
      name: &quot;Jenny&quot;,
      age: 85
    },
    {
      name: &quot;Nancy&quot;,
      age: 2
    },
    {
      name: &quot;Carl&quot;,
      age: 40
    }
  ];
  </code></pre>
  <p>here you can see the nancy is occuring twice i want to add the age of two nancy and put in the array  that is</p>
  <pre><code>var family = [
    {
      name: &quot;Mike&quot;,
      age: 10
    },
    {
      name: &quot;Matt&quot;
      age: 13
    },
    {
      name: &quot;Nancy&quot;,
      age: 17
    },
    {
      name: &quot;Adam&quot;,
      age: 22
    },
    {
      name: &quot;Jenny&quot;,
      age: 85
    },
    {
      name: &quot;Carl&quot;,
      age: 40
    }
  ];
  </code></pre>
  <p>means if the user enter the same detail twice then simply add the age and put it in the same place ..</p>
  <p>Thank you!</p>