title: react native- json parsing (cant parse json object in my code)
body: <p>Here is my code. In this I got x but when I try to parsing x for getting object of x 'isloggedin' it gives error. what should I do wrong tell me if you understand my problem.   </p>
  
  <pre><code>componentDidMount() {
      this.onLoad();
    }
   onLoad = async () =&gt; {
      try {
          var walletdata = await AsyncStorage.getItem('wallet');
          this.setState({x: JSON.parse(walletdata)})
          this.setState({y: JSON.stringify(this.state.x)})
          console.log("output:  "+ this.state.y);
          console.log("output y:"+JSON.parse(this.state.y.isloggedIn));
        }catch(error){
          console.log("error: "+error);
        }
    }
  </code></pre>
  
  <p>error: SyntaxError: JSON Parse error: Unexpected identifier "undefined"</p>