> For the complete documentation index, see [llms.txt](https://asad-razvi.gitbook.io/javascript-cookbook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://asad-razvi.gitbook.io/javascript-cookbook/rxjs-recipes/how-can-i-transform-an-array-of-numbers.md).

# How can I transform an array of numbers?

```javascript
Rx.Observable.from([1, 'asad', 3, null, 5, {}, 7])  
  .map(value => parseInt(value, 10))
  .filter(value => !isNaN(value))
  .reduce((total, value) => total + value)
  .subscribe(result => console.log(result))
```
