Ionic Storage 未正确输出我存储的 JSON 数据 - Angular

Ionic Storage not outputing my stored JSON data correctly - Angular

我有如下内容:

    Storage.remove({key: 'somedata'}).then(r => {
      Storage.set({key: 'somedata', value: data}).then(g => {
        Storage.get({key : 'somedata'}).then((val) => {
          console.log('Your json is', val);
        });
      });
    });

我从 JSON 中的 API 获取数据并尝试存储它。

然后当我尝试在控制台中输出存储的数据时,我得到以下信息

我想知道如何获取实际数据而不是对象对象

谢谢

更新 - 潜在解决方案的错误截图:

在我看来,我认为你可以试试这个

Storage.remove(key).then(r => {
   Storage.set(key, data).then(g => {
      Storage.get(key).then((val) => {
          console.log('Your json is', val);
      });
   });
});

我认为你不需要删除

Storage.set(key, data).then(g => {
   Storage.get(key).then((val) => {
      console.log('Your json is', val);
   });
});