Question: I have an array of objects

```
var arr = [{a:1},{a:5}, {a:6},{a:11}];

```

I want to use underscore find where function to retrieve object satisfying condition `a = 1` or `a =11`

**like:**

```
_findWhere(arr, {a:1} || {a:11})

```

Anything like this is possible ??

Answer: 
[**find**](http://underscorejs.org/#find) behaves like findWhere in that it returns the first item that passes the search criteria. With find you can use a predicate to specify the search criteria.

```
var result = _.find(arr, function(item) {
    return item.a == 1 || item.a == 11;
});

```
For your case better to use `find` function. You can use function that passed as a second argument to `find` method and checks your two conditions:

```js
var arr = [{ a: 1 }, { a: 5 }, { a: 6 }, { a: 11 }];

var elem = _.find(arr, function(e) {
    return e.a == 1 || e.a == 11;
});

document.write(JSON.stringify(elem));
```

```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
```

---

Or using plain javascript (`ES2015`):

```js
var arr = [{ a: 1 }, { a: 5 }, { a: 6 }, { a: 11 }];

var elem = arr.find(function(e) {
    return e.a == 1 || e.a == 11;
});

document.write(JSON.stringify(elem));
```