Hello,
I'm trying to parse some data using appleScript and JSON helper,
specifically trying to get the value of src of the image property.
tell application "JSON Helper"
-- fetch the JSON
set wallpaperJson to fetch JSON from "https://glowing-torch-5096.firebaseio.com//kimono/api/95cifi2g/latest.json"
-- pull out the URL
set wallpaperUrl to src of image of model of results of wallpaperJson
Result,
error "Can’t get image of {{image:{alt:\"April by Rich Cutrone on 500px\", src:\"https://drscdn.500px.org/photo/141047085/q%3D80_h%3D300/fa5a7f61529d6e30a31c04edc63ccdec\"}}}." number -1728 from image of {{image:{alt:"April by Rich Cutrone on 500px", src:"https://drscdn.500px.org/photo/141047085/q%3D80_h%3D300/fa5a7f61529d6e30a31c04edc63ccdec"}}}
Here the source JSON:
{"count":1,"lastrunstatus":"success","name":"500HDPic","newdata":true,"results":{"model":[{"image":{"alt":"April by Rich Cutrone on 500px","src":"https://drscdn.500px.org/photo/141047085/q%3D80_h%3D300/fa5a7f61529d6e30a31c04edc63ccdec"}}]},"thisversionrun":"Mon Feb 22 2016 02:26:31 GMT+0000 (UTC)","thisversionstatus":"success","version":1}
Any help will be very appreciated. Thanks!
