how to access the JSON object in IONIC ??
want to access the Photo attribute from the JSON Object, I am new to Angular and Loopback, I have been trying for Hours but I am not able to access that photo attribute.
Here is the JSON object I am getting from the Server
__zone_symbol__state: true __zone_symbol__value: {…} Photo: "http://192.168.1.11:3000/api/Pictures/images/download/1559895053710.jpg" email: "[email protected]" emailVerified: false mobileno: "9490100101" name: "Testuser" societyId: "5ca71e45af5f770e103cff5a" username: "Test1"
And Here is the method I am using to access the attribute as in loopback page I have read that they can be accessed by using just '.'
var k = this.auth.profiledata(); console.log(k.Photo);
The actual output should be this "http://192.168.1.11:3000/api/Pictures/images/download/1559895053710.jpg" when printing the K value but I am getting undefined.
when I stringify the output i am getting this Object { __zone_symbol__state: null, __zone_symbol__value: [] }
instead of the JSON Object
try converting to JSON using toJSON()
i figured it out thank you
How did you access the value of the photo? I have the same problem