# Filter a Javascript Array

> Following code filters the array.

- Canonical: https://preview.arshadmehmood.com/today-i-learned/javascript/filter-array/
- Section: javascript
- Author: Arshad Mehmood

Following code filters the array.

```js
  var result = jsObjects.filter(obj => {
  		return obj.b === 6
	})
```

