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
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.