Reputation: 4065
How do I get get the value url
from this string:
[{
"url": "https://www.filepicker.io/api/file/WGS4Wmkk",
"filename": "4827889.jpg",
"mimetype": "image/jpeg",
"size": 53113,
"key": "be7BxONVHe_48278891840.jpg",
"isWriteable": false
}]
With jquery or regular javascript
Upvotes: 0
Views: 8569
Reputation: 108530
If str
is the string you posted above, you can use JSON to parse it:
var data = JSON.parse(str);
console.log(data[0].url); // the url value
Upvotes: 8