AsyncStorage returns 数组到字符串 react-native

AsyncStorage returns array to string react-native

我有一个存储在 AsyncStorage 上的数组 Json.stringfy。当我尝试将密钥 returns 作为字符串获取时。我想要的是这样的[0:'apple', 1:'ball', 2:'car']。以下是我试过的方法

  useEffect(() => {
     AsyncStorage.getItem('@moduke').then(module => {
        const a = JSON.parse(module);
        console.log(a.length);
     });
  }, []);

字符串被“ ”包围。并使用 " 。当尝试通过 JSON.parse() 解析上述字符串时,仍然 return 字符串:{"0:'apple', 1:'ball', 2:'car'},并且 \" 被替换为 ".但是再次使用 JSON.parse() ,它将 return 我解决的对象如下方法

     useEffect(() => {
         AsyncStorage.getItem('@moduke').then(module => {
            const a = JSON.parse(module);
            const b = JSON.parse(a);
            console.log(b);
            console.log(b.length);
         });
      }, []);