@pisxid12 wrote:
Hi,
I need to get the JSON values, but there is an error that says “user doesn’t exists in the Object type”:My function:
search(path): Promise<any> { return this.http.get(path) .toPromise() .then( response => { // Success if (response != false) { this.storage.set('user', JSON.stringify(response)); this.storage.set('alerts', 920); console.log(response.user.age); ///<---- Here the error return response; } else { return null; } }, error => { // Error return null; }); }
Posts: 3
Participants: 2