Array object undefined

i;m using cordova fileTransfer to upload files.
i get a return of json object

and then, i want to access the value in response json object

var obj = {"public_id":"ANNOUNCE/image_ejqayr","version":1535865138,"signature":"somethign","width":3120,"height":4160,"format":"jpg","resource_type":"image","created_at":"2018-09-02T05:12:18Z","tags":["AN"],"bytes":8259089,"type":"upload","etag":"b4697b7ff5b9640c95512e6f77e93440","placeholder":false,"url":"http://res.cloudinary.com/.../image.jpg","secure_url":"https://res.cloudinary.com/.../image.jpg","existing":false,"original_filename":"image"}

for example, x = obj.secure_url;

if i test this in www.w3schools.com website,i get to retrieve the value.

if i test in angular, kept getting value = undefined.

i really doesnt know whats the problem