I'm trying to search if data exist on my object and this code work as I expected,but I have problem when showing result. It show all index I have on my object.

How I stop looping if result was found in my object

```js
$(document).ready(function(){
 var myData = {
  "animals":[{
   "name":"cat"
  },
  {
   "name":"dog"
  },
  {
   "name":"horse"
  },
  {
   "name":"bear"
  }
  ]};

 $('#send').click(function(){
  var res = $('#animal').val();

  $.each(myData.animals, function(i,j){
   if(j.name == res){
    console.log('found');
   }
   else{
    console.log('not found');
   }
  });

    });
});
```

```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="myData">
 <input type="text" id='animal'>
 <button id='send'>find</button>
</div>
```