With native storage plugin in ionic i am unable to access the data keys values?

this.nativeStorage.getItem(‘userDetailes’)
.then(
data =>{
if(data.id_token==null){

       }
       else
       {
         console.log(data);
         this.appService.getUserId(JSON.parse(data.user))
         .subscribe(data => {
           console.log(data);
           var userLikedItem={
             userId:data.user.id,
             offerId:offer._id
           };
           this.appService.addToUserLikedItems(userLikedItem)
           .subscribe(data => {
             console.log(data);
           });
         });           
       }


it’s actually displaying object but the problem is i can’t be able to access individual property.It’s showing undefined.

Unless you are absolutely, positively certain of what you are doing and why, do your best to only have truthy/falsy conditions in JavaScript if statements (i.e. !data.id_token instead here). I would prefer using ionic-storage over the native storage plugin, as it will work in browsers as well. Furthermore, you seem to be storing and retrieving an array, yet treating it as an object.