# Manipulate data out of storage

**URL:** <https://forum.ionicframework.com/t/manipulate-data-out-of-storage/83540>\
**Category:** ionic-v3\
**Created:** [March 20, 2017, 8:48pm UTC](https://forum.ionicframework.com/t/manipulate-data-out-of-storage/83540 "2017-03-20T20:48:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![KaylFr](https://avatars.discourse-cdn.com/v4/letter/k/dfb087/32.png) [@KaylFr](https://forum.ionicframework.com/u/KaylFr)\
**Post date:** [March 20, 2017, 8:48pm UTC](https://forum.ionicframework.com/t/manipulate-data-out-of-storage/83540/1 "2017-03-20T20:48:03Z")

</div>

Hello,

Here is a list of all the files that I have.

Here is an example of what I would like to do

```
  var dataSave:any;
  this.storage.get('currentUser').then((data) => {
    dataSave = data;
  });

  console.log('MyData => '+dataSave)

```

The console displays [MyData =\> undefined]

How can I do ?

thank you

Loïc

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [March 20, 2017, 8:49pm UTC](https://forum.ionicframework.com/t/manipulate-data-out-of-storage/83540/2 "2017-03-20T20:49:53Z")

</div>

The only place you can rely on `data` is inside the `then` block.

---

<div class="post-metadata">

**Author:** ![KaylFr](https://avatars.discourse-cdn.com/v4/letter/k/dfb087/32.png) [@KaylFr](https://forum.ionicframework.com/u/KaylFr)\
**Post date:** [March 20, 2017, 8:54pm UTC](https://forum.ionicframework.com/t/manipulate-data-out-of-storage/83540/3 "2017-03-20T20:54:50Z")

</div>

No solution to “export” them?

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [March 20, 2017, 8:57pm UTC](https://forum.ionicframework.com/t/manipulate-data-out-of-storage/83540/4 "2017-03-20T20:57:34Z")

</div>

> [@KaylFr](#):
>
> No solution to “export” them?

No. That’s the entire point of how asynchronous JavaScript works.

---

<div class="post-metadata">

**Author:** ![KaylFr](https://avatars.discourse-cdn.com/v4/letter/k/dfb087/32.png) [@KaylFr](https://forum.ionicframework.com/u/KaylFr)\
**Post date:** [March 20, 2017, 9:00pm UTC](https://forum.ionicframework.com/t/manipulate-data-out-of-storage/83540/5 "2017-03-20T21:00:20Z")

</div>

OK thank you for the information
