# Observable addAll adds "" to Array

**URL:** <https://forums.fusetools.com/t/observable-addall-adds-to-array/6027>\
**Category:** How-to Discussions\
**Created:** [April 29, 2017, 9:27am UTC](https://forums.fusetools.com/t/observable-addall-adds-to-array/6027 "2017-04-29T09:27:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevin](https://avatars.discourse-cdn.com/v4/letter/k/2acd7d/32.png) [@kevin](https://forums.fusetools.com/u/kevin)\
**Post date:** [April 29, 2017, 9:27am UTC](https://forums.fusetools.com/t/observable-addall-adds-to-array/6027/1 "2017-04-29T09:27:25Z")

</div>

Ho can i get rid of the `"` when i do a `.addAll`

```
  var obs = Observable(0);
  debug_log("Numbets to add: "+listUserIdForLifeFeed.value.toString())
  obs.addAll( listUserIdForLifeFeed.value.toString() )
  var obsArray = obs.toArray(); 
  debug_log("the new numbers: " + JSON.stringify(obsArray))

```

debug log:

```
	LOG: Numbets to add: 33,34,211,37,36
	LOG: the new numbers: [0,"33,34,211,37,36"]
```

---

<div class="post-metadata">

**Author:** ![Uldis](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/uldis/32/657_2.png) [@Uldis](https://forums.fusetools.com/u/Uldis)\
**Post date:** [April 29, 2017, 10:04am UTC](https://forums.fusetools.com/t/observable-addall-adds-to-array/6027/2 "2017-04-29T10:04:41Z")

</div>

Hi Kevin,

you are adding a _string_ to the other Observable. If you want to add all of the numbers from the source Observable, you should instead try this:

```auto
obs.addAll( listUserIdForLifeFeed.toArray() )

```

---

<div class="post-metadata">

**Author:** ![kevin](https://avatars.discourse-cdn.com/v4/letter/k/2acd7d/32.png) [@kevin](https://forums.fusetools.com/u/kevin)\
**Post date:** [April 29, 2017, 10:20am UTC](https://forums.fusetools.com/t/observable-addall-adds-to-array/6027/3 "2017-04-29T10:20:34Z")

</div>

that give me:

```
    Source line: obs.addAll( listUserIdForLifeFeed.value.toArray() )
    JS stack trace: TypeError: listUserIdForLifeFeed.value.toArray is not a function
        at getTimeLineData (MainView.js:704:43)
        at reloadHandler (MainView.js:2145:5)
     in Fuse.Reactive.EventBinding+CallClosure</Users/Kevin/Library/Application Support/Fusetools/Packages/Fuse.Reactive/0.46.1/$.uno:839>
```

---

<div class="post-metadata">

**Author:** ![Uldis](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/uldis/32/657_2.png) [@Uldis](https://forums.fusetools.com/u/Uldis)\
**Post date:** [April 29, 2017, 10:25am UTC](https://forums.fusetools.com/t/observable-addall-adds-to-array/6027/4 "2017-04-29T10:25:47Z")

</div>

Oh, sorry, my bad. `.toArray()` is a member function of the Observable, not its value. I have edited my post above to show the correct code.

It’s this: `obs.addAll( listUserIdForLifeFeed.toArray() )`

---

<div class="post-metadata">

**Author:** ![Uldis](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/uldis/32/657_2.png) [@Uldis](https://forums.fusetools.com/u/Uldis)\
**Post date:** [April 29, 2017, 10:27am UTC](https://forums.fusetools.com/t/observable-addall-adds-to-array/6027/5 "2017-04-29T10:27:44Z")

</div>

That will of course only work if your `listUserIdForLifeFeed` is an Observable list. If it is a single-value Observable that holds a string, you will need a different approach that splits the string into an array first.
