title: How to find item in Array objects
body: <p>I am having array objects in jquery in which has n number of items </p>
  
  <pre><code>array={id:1, name:x};
  array={id:2, name:y};
  array={id:3, name:z};
  .
  .
  .
  .
  array={id:n, name:n};
  </code></pre>
  
  <p>Now I have to find particular item in this array object since i dont know the index of item. </p>
  
  <pre><code>if(array.id==item)
  {
  // change array.name=somename;
  }
  else
  {
  //add new value into array
  array.push({id=item,name=somename});
  }
  </code></pre>
  
  <p>Without using index of an item do i have any option in foreach or any other method to find an item in jquery?</p>