I'm not going to explain all the details of where I get my search values from but basically a link like this is generated:
http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStoreServices.woa/wa/wsSearch?term="Search Term Goes Here"
This returns some JSON like this for example:
Code:
{
"resultCount":1,
"results": [
{"wrapperType":"track", "kind":"song", "artistId":472054, "collectionId":184335550, "trackId":184335659, "artistName":"John Mayer", "collectionName":"Continuum", "trackName":"Belief", "collectionCensoredName":"Continuum", "trackCensoredName":"Belief", "artistViewUrl":"http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewArtist?id=472054&uo=4", "collectionViewUrl":"http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?i=184335659&id=184335550&s=143441&uo=4", "trackViewUrl":"http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?i=184335659&id=184335550&s=143441&uo=4", "previewUrl":"http://a1326.phobos.apple.com/us/r1000/032/Music/e0/dc/ff/mzi.jffbdfrt.aac.p.m4p", "artworkUrl60":"http://a1.phobos.apple.com/us/r1000/036/Features/ec/11/bc/dj.eyubftes.60x60-50.jpg", "artworkUrl100":"http://a1.phobos.apple.com/us/r1000/036/Features/ec/11/bc/dj.eyubftes.100x100-75.jpg", "collectionPrice":9.99000, "trackPrice":0.99000, "collectionExplicitness":"notExplicit", "trackExplicitness":"notExplicit", "discCount":1, "discNumber":1, "trackCount":12, "trackNumber":3, "trackTimeMillis":242250, "country":"USA", "currency":"USD", "primaryGenreName":"Rock"}
}
I need help writing some sort of javascript that will pick out certain values from this.
For example the 'track view url' and then take the user to this URL.
Thanks, James