Recently, I had the need to parse some JSON in a shell script. This is perhaps not surprisingly something that the various shells aren't exactly cut out for. Fortunately, on OS X, there is a pretty great way to fetch data out of a JSON data structure by using Javascript.

Here's a simple example using the iTunes search API. Let's say you wanted to get the track view URL for every track on Five Iron Frenzy's new album Engine of a Million Plots. Getting the JSON data for the album is pretty simple:

json=$(curl "https://itunes.apple.com/search?term=Five+Iron+Frenzy+Engine+of+a+Million+Plots")

This will give us a messy result like this:

{
 "resultCount":12,
 "results": [
{"wrapperType":"track", "kind":"song", "artistId":275828069, "collectionId":727391260, "trackId":727391810, "artistName":"Five Iron Frenzy", "collectionName":"Engine of a Million Plots", "trackName":"Battle Dancing Unicorns with Glitter", "collectionCensoredName":"Engine of a Million Plots", "trackCensoredName":"Battle Dancing Unicorns with Glitter", "artistViewUrl":"https://itunes.apple.com/us/artist/five-iron-frenzy/id275828069?uo=4", "collectionViewUrl":"https://itunes.apple.com/us/album/battle-dancing-unicorns-glitter/id727391260?i=727391810&uo=4", "trackViewUrl":"https://itunes.apple.com/us/album/battle-dancing-unicorns-glitter/id727391260?i=727391810&uo=4", "previewUrl":"http://a935.phobos.apple.com/us/r30/Music/v4/29/e8/94/29e89424-3836-d0de-5c0f-d75bdfa097da/mzaf_5451518382890404402.plus.aac.p.m4a", "artworkUrl30":"http://a1.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.30x30-50.jpg", "artworkUrl60":"http://a5.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.60x60-50.jpg", "artworkUrl100":"http://a2.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.100x100-75.jpg", "collectionPrice":9.99, "trackPrice":1.29, "releaseDate":"2013-11-26T08:00:00Z", "collectionExplicitness":"notExplicit", "trackExplicitness":"notExplicit", "discCount":1, "discNumber":1, "trackCount":12, "trackNumber":8, "trackTimeMillis":223811, "country":"USA", "currency":"USD", "primaryGenreName":"Rock", "radioStationUrl":"https://itunes.apple.com/us/station/idra.727391810"}, 
{"wrapperType":"track", "kind":"song", "artistId":275828069, "collectionId":727391260, "trackId":727391808, "artistName":"Five Iron Frenzy", "collectionName":"Engine of a Million Plots", "trackName":"I Am Jack's Smirking Revenge", "collectionCensoredName":"Engine of a Million Plots", "trackCensoredName":"I Am Jack's Smirking Revenge", "artistViewUrl":"https://itunes.apple.com/us/artist/five-iron-frenzy/id275828069?uo=4", "collectionViewUrl":"https://itunes.apple.com/us/album/i-am-jacks-smirking-revenge/id727391260?i=727391808&uo=4", "trackViewUrl":"https://itunes.apple.com/us/album/i-am-jacks-smirking-revenge/id727391260?i=727391808&uo=4", "previewUrl":"http://a1051.phobos.apple.com/us/r30/Music/v4/84/fa/9e/84fa9e3b-e89e-27a2-bc9e-898b0cd1cc0c/mzaf_882529060617425778.plus.aac.p.m4a", "artworkUrl30":"http://a1.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.30x30-50.jpg", "artworkUrl60":"http://a5.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.60x60-50.jpg", "artworkUrl100":"http://a2.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.100x100-75.jpg", "collectionPrice":9.99, "trackPrice":1.29, "releaseDate":"2013-11-26T08:00:00Z", "collectionExplicitness":"notExplicit", "trackExplicitness":"notExplicit", "discCount":1, "discNumber":1, "trackCount":12, "trackNumber":6, "trackTimeMillis":185707, "country":"USA", "currency":"USD", "primaryGenreName":"Rock", "radioStationUrl":"https://itunes.apple.com/us/station/idra.727391808"}, 
{"wrapperType":"track", "kind":"song", "artistId":275828069, "collectionId":727391260, "trackId":727391800, "artistName":"Five Iron Frenzy", "collectionName":"Engine of a Million Plots", "trackName":"So Far", "collectionCensoredName":"Engine of a Million Plots", "trackCensoredName":"So Far", "artistViewUrl":"https://itunes.apple.com/us/artist/five-iron-frenzy/id275828069?uo=4", "collectionViewUrl":"https://itunes.apple.com/us/album/so-far/id727391260?i=727391800&uo=4", "trackViewUrl":"https://itunes.apple.com/us/album/so-far/id727391260?i=727391800&uo=4", "previewUrl":"http://a85.phobos.apple.com/us/r30/Music6/v4/0c/5e/a4/0c5ea446-2b5d-61bb-3c45-db1498132543/mzaf_4338087916891277666.plus.aac.p.m4a", "artworkUrl30":"http://a1.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.30x30-50.jpg", "artworkUrl60":"http://a5.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.60x60-50.jpg", "artworkUrl100":"http://a2.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.100x100-75.jpg", "collectionPrice":9.99, "trackPrice":1.29, "releaseDate":"2013-11-26T08:00:00Z", "collectionExplicitness":"notExplicit", "trackExplicitness":"notExplicit", "discCount":1, "discNumber":1, "trackCount":12, "trackNumber":2, "trackTimeMillis":207086, "country":"USA", "currency":"USD", "primaryGenreName":"Rock", "radioStationUrl":"https://itunes.apple.com/us/station/idra.727391800"}, 
{"wrapperType":"track", "kind":"song", "artistId":275828069, "collectionId":727391260, "trackId":727391812, "artistName":"Five Iron Frenzy", "collectionName":"Engine of a Million Plots", "trackName":"Into Your Veins", "collectionCensoredName":"Engine of a Million Plots", "trackCensoredName":"Into Your Veins", "artistViewUrl":"https://itunes.apple.com/us/artist/five-iron-frenzy/id275828069?uo=4", "collectionViewUrl":"https://itunes.apple.com/us/album/into-your-veins/id727391260?i=727391812&uo=4", "trackViewUrl":"https://itunes.apple.com/us/album/into-your-veins/id727391260?i=727391812&uo=4", "previewUrl":"http://a768.phobos.apple.com/us/r30/Music6/v4/73/d5/12/73d512e8-a274-7d7a-709e-c2af606e1103/mzaf_1303053647123199926.plus.aac.p.m4a", "artworkUrl30":"http://a1.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.30x30-50.jpg", "artworkUrl60":"http://a5.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.60x60-50.jpg", "artworkUrl100":"http://a2.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.100x100-75.jpg", "collectionPrice":9.99, "trackPrice":1.29, "releaseDate":"2013-11-26T08:00:00Z", "collectionExplicitness":"notExplicit", "trackExplicitness":"notExplicit", "discCount":1, "discNumber":1, "trackCount":12, "trackNumber":9, "trackTimeMillis":181987, "country":"USA", "currency":"USD", "primaryGenreName":"Rock", "radioStationUrl":"https://itunes.apple.com/us/station/idra.727391812"}, 
{"wrapperType":"track", "kind":"song", "artistId":275828069, "collectionId":727391260, "trackId":727391815, "artistName":"Five Iron Frenzy", "collectionName":"Engine of a Million Plots", "trackName":"I've Seen the Sun", "collectionCensoredName":"Engine of a Million Plots", "trackCensoredName":"I've Seen the Sun", "artistViewUrl":"https://itunes.apple.com/us/artist/five-iron-frenzy/id275828069?uo=4", "collectionViewUrl":"https://itunes.apple.com/us/album/ive-seen-the-sun/id727391260?i=727391815&uo=4", "trackViewUrl":"https://itunes.apple.com/us/album/ive-seen-the-sun/id727391260?i=727391815&uo=4", "previewUrl":"http://a1836.phobos.apple.com/us/r30/Music/v4/00/9e/af/009eaf14-2e17-429a-2b7f-df32081e462e/mzaf_8413083121780261410.plus.aac.p.m4a", "artworkUrl30":"http://a1.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.30x30-50.jpg", "artworkUrl60":"http://a5.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.60x60-50.jpg", "artworkUrl100":"http://a2.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.100x100-75.jpg", "collectionPrice":9.99, "trackPrice":1.29, "releaseDate":"2013-11-26T08:00:00Z", "collectionExplicitness":"notExplicit", "trackExplicitness":"notExplicit", "discCount":1, "discNumber":1, "trackCount":12, "trackNumber":11, "trackTimeMillis":182842, "country":"USA", "currency":"USD", "primaryGenreName":"Rock", "radioStationUrl":"https://itunes.apple.com/us/station/idra.727391815"}, 
{"wrapperType":"track", "kind":"song", "artistId":275828069, "collectionId":727391260, "trackId":727391798, "artistName":"Five Iron Frenzy", "collectionName":"Engine of a Million Plots", "trackName":"Against a Sea of Troubles", "collectionCensoredName":"Engine of a Million Plots", "trackCensoredName":"Against a Sea of Troubles", "artistViewUrl":"https://itunes.apple.com/us/artist/five-iron-frenzy/id275828069?uo=4", "collectionViewUrl":"https://itunes.apple.com/us/album/against-a-sea-of-troubles/id727391260?i=727391798&uo=4", "trackViewUrl":"https://itunes.apple.com/us/album/against-a-sea-of-troubles/id727391260?i=727391798&uo=4", "previewUrl":"http://a1034.phobos.apple.com/us/r30/Music/v4/1a/d4/c3/1ad4c3b1-4ce1-3756-abf1-e22f2cea0bb5/mzaf_8378446208896535319.plus.aac.p.m4a", "artworkUrl30":"http://a1.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.30x30-50.jpg", "artworkUrl60":"http://a5.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.60x60-50.jpg", "artworkUrl100":"http://a2.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.100x100-75.jpg", "collectionPrice":9.99, "trackPrice":1.29, "releaseDate":"2013-11-26T08:00:00Z", "collectionExplicitness":"notExplicit", "trackExplicitness":"notExplicit", "discCount":1, "discNumber":1, "trackCount":12, "trackNumber":1, "trackTimeMillis":206532, "country":"USA", "currency":"USD", "primaryGenreName":"Rock", "radioStationUrl":"https://itunes.apple.com/us/station/idra.727391798"}, 
{"wrapperType":"track", "kind":"song", "artistId":275828069, "collectionId":727391260, "trackId":727391814, "artistName":"Five Iron Frenzy", "collectionName":"Engine of a Million Plots", "trackName":"It Was a Dark & Stormy Night", "collectionCensoredName":"Engine of a Million Plots", "trackCensoredName":"It Was a Dark & Stormy Night", "artistViewUrl":"https://itunes.apple.com/us/artist/five-iron-frenzy/id275828069?uo=4", "collectionViewUrl":"https://itunes.apple.com/us/album/it-was-a-dark-stormy-night/id727391260?i=727391814&uo=4", "trackViewUrl":"https://itunes.apple.com/us/album/it-was-a-dark-stormy-night/id727391260?i=727391814&uo=4", "previewUrl":"http://a415.phobos.apple.com/us/r30/Music6/v4/a0/a7/41/a0a741dc-e106-a713-3591-4954fe44574d/mzaf_7943587949145740493.plus.aac.p.m4a", "artworkUrl30":"http://a1.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.30x30-50.jpg", "artworkUrl60":"http://a5.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.60x60-50.jpg", "artworkUrl100":"http://a2.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.100x100-75.jpg", "collectionPrice":9.99, "trackPrice":1.29, "releaseDate":"2013-11-26T08:00:00Z", "collectionExplicitness":"notExplicit", "trackExplicitness":"notExplicit", "discCount":1, "discNumber":1, "trackCount":12, "trackNumber":10, "trackTimeMillis":204412, "country":"USA", "currency":"USD", "primaryGenreName":"Rock", "radioStationUrl":"https://itunes.apple.com/us/station/idra.727391814"}, 
{"wrapperType":"track", "kind":"song", "artistId":275828069, "collectionId":727391260, "trackId":727391809, "artistName":"Five Iron Frenzy", "collectionName":"Engine of a Million Plots", "trackName":"To Start a Fire", "collectionCensoredName":"Engine of a Million Plots", "trackCensoredName":"To Start a Fire", "artistViewUrl":"https://itunes.apple.com/us/artist/five-iron-frenzy/id275828069?uo=4", "collectionViewUrl":"https://itunes.apple.com/us/album/to-start-a-fire/id727391260?i=727391809&uo=4", "trackViewUrl":"https://itunes.apple.com/us/album/to-start-a-fire/id727391260?i=727391809&uo=4", "previewUrl":"http://a1044.phobos.apple.com/us/r30/Music4/v4/59/25/d7/5925d704-9971-ceed-86b9-ebe7d8f457c0/mzaf_5486913636879703219.plus.aac.p.m4a", "artworkUrl30":"http://a1.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.30x30-50.jpg", "artworkUrl60":"http://a5.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.60x60-50.jpg", "artworkUrl100":"http://a2.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.100x100-75.jpg", "collectionPrice":9.99, "trackPrice":1.29, "releaseDate":"2013-11-26T08:00:00Z", "collectionExplicitness":"notExplicit", "trackExplicitness":"notExplicit", "discCount":1, "discNumber":1, "trackCount":12, "trackNumber":7, "trackTimeMillis":235588, "country":"USA", "currency":"USD", "primaryGenreName":"Rock", "radioStationUrl":"https://itunes.apple.com/us/station/idra.727391809"}, 
{"wrapperType":"track", "kind":"song", "artistId":275828069, "collectionId":727391260, "trackId":727391802, "artistName":"Five Iron Frenzy", "collectionName":"Engine of a Million Plots", "trackName":"Zen & the Art of Xenophobia", "collectionCensoredName":"Engine of a Million Plots", "trackCensoredName":"Zen & the Art of Xenophobia", "artistViewUrl":"https://itunes.apple.com/us/artist/five-iron-frenzy/id275828069?uo=4", "collectionViewUrl":"https://itunes.apple.com/us/album/zen-the-art-of-xenophobia/id727391260?i=727391802&uo=4", "trackViewUrl":"https://itunes.apple.com/us/album/zen-the-art-of-xenophobia/id727391260?i=727391802&uo=4", "previewUrl":"http://a1347.phobos.apple.com/us/r30/Music6/v4/48/b1/8d/48b18d26-4970-d60b-7844-7cf444dc3dac/mzaf_8666666522243084470.plus.aac.p.m4a", "artworkUrl30":"http://a1.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.30x30-50.jpg", "artworkUrl60":"http://a5.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.60x60-50.jpg", "artworkUrl100":"http://a2.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.100x100-75.jpg", "collectionPrice":9.99, "trackPrice":1.29, "releaseDate":"2013-11-26T08:00:00Z", "collectionExplicitness":"notExplicit", "trackExplicitness":"notExplicit", "discCount":1, "discNumber":1, "trackCount":12, "trackNumber":3, "trackTimeMillis":194059, "country":"USA", "currency":"USD", "primaryGenreName":"Rock", "radioStationUrl":"https://itunes.apple.com/us/station/idra.727391802"}, 
{"wrapperType":"track", "kind":"song", "artistId":275828069, "collectionId":727391260, "trackId":727391816, "artistName":"Five Iron Frenzy", "collectionName":"Engine of a Million Plots", "trackName":"Blizzards & Bygones", "collectionCensoredName":"Engine of a Million Plots", "trackCensoredName":"Blizzards & Bygones", "artistViewUrl":"https://itunes.apple.com/us/artist/five-iron-frenzy/id275828069?uo=4", "collectionViewUrl":"https://itunes.apple.com/us/album/blizzards-bygones/id727391260?i=727391816&uo=4", "trackViewUrl":"https://itunes.apple.com/us/album/blizzards-bygones/id727391260?i=727391816&uo=4", "previewUrl":"http://a1455.phobos.apple.com/us/r30/Music/v4/d5/f0/60/d5f06031-3f6d-3f72-7ea0-0ff02c2d2ca8/mzaf_1536146644911585763.plus.aac.p.m4a", "artworkUrl30":"http://a1.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.30x30-50.jpg", "artworkUrl60":"http://a5.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.60x60-50.jpg", "artworkUrl100":"http://a2.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.100x100-75.jpg", "collectionPrice":9.99, "trackPrice":1.29, "releaseDate":"2013-11-26T08:00:00Z", "collectionExplicitness":"notExplicit", "trackExplicitness":"notExplicit", "discCount":1, "discNumber":1, "trackCount":12, "trackNumber":12, "trackTimeMillis":293560, "country":"USA", "currency":"USD", "primaryGenreName":"Rock", "radioStationUrl":"https://itunes.apple.com/us/station/idra.727391816"}, 
{"wrapperType":"track", "kind":"song", "artistId":275828069, "collectionId":727391260, "trackId":727391804, "artistName":"Five Iron Frenzy", "collectionName":"Engine of a Million Plots", "trackName":"We Own the Skies", "collectionCensoredName":"Engine of a Million Plots", "trackCensoredName":"We Own the Skies", "artistViewUrl":"https://itunes.apple.com/us/artist/five-iron-frenzy/id275828069?uo=4", "collectionViewUrl":"https://itunes.apple.com/us/album/we-own-the-skies/id727391260?i=727391804&uo=4", "trackViewUrl":"https://itunes.apple.com/us/album/we-own-the-skies/id727391260?i=727391804&uo=4", "previewUrl":"http://a1223.phobos.apple.com/us/r30/Music6/v4/76/93/45/76934568-73ab-d264-0f65-1b60d9ddfda5/mzaf_7369859256653584586.plus.aac.p.m4a", "artworkUrl30":"http://a1.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.30x30-50.jpg", "artworkUrl60":"http://a5.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.60x60-50.jpg", "artworkUrl100":"http://a2.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.100x100-75.jpg", "collectionPrice":9.99, "trackPrice":1.29, "releaseDate":"2013-11-26T08:00:00Z", "collectionExplicitness":"notExplicit", "trackExplicitness":"notExplicit", "discCount":1, "discNumber":1, "trackCount":12, "trackNumber":4, "trackTimeMillis":164539, "country":"USA", "currency":"USD", "primaryGenreName":"Rock", "radioStationUrl":"https://itunes.apple.com/us/station/idra.727391804"}, 
{"wrapperType":"track", "kind":"song", "artistId":275828069, "collectionId":727391260, "trackId":727391806, "artistName":"Five Iron Frenzy", "collectionName":"Engine of a Million Plots", "trackName":"Someone Else's Problem", "collectionCensoredName":"Engine of a Million Plots", "trackCensoredName":"Someone Else's Problem", "artistViewUrl":"https://itunes.apple.com/us/artist/five-iron-frenzy/id275828069?uo=4", "collectionViewUrl":"https://itunes.apple.com/us/album/someone-elses-problem/id727391260?i=727391806&uo=4", "trackViewUrl":"https://itunes.apple.com/us/album/someone-elses-problem/id727391260?i=727391806&uo=4", "previewUrl":"http://a8.phobos.apple.com/us/r30/Music6/v4/87/a9/5f/87a95fc8-ef4e-0daa-5daa-2516a93b27ef/mzaf_2972591630407063587.plus.aac.p.m4a", "artworkUrl30":"http://a1.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.30x30-50.jpg", "artworkUrl60":"http://a5.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.60x60-50.jpg", "artworkUrl100":"http://a2.mzstatic.com/us/r30/Music/v4/9f/72/7b/9f727b14-d6b0-6fd0-7cfb-8047a48d046c/EOMP-Cover.100x100-75.jpg", "collectionPrice":9.99, "trackPrice":1.29, "releaseDate":"2013-11-26T08:00:00Z", "collectionExplicitness":"notExplicit", "trackExplicitness":"notExplicit", "discCount":1, "discNumber":1, "trackCount":12, "trackNumber":5, "trackTimeMillis":196346, "country":"USA", "currency":"USD", "primaryGenreName":"Rock", "radioStationUrl":"https://itunes.apple.com/us/station/idra.727391806"}]
}

An enterprising hacker might break out every grep, sed, and awk trick in his or her toolbelt and might achieve a result that works for the specific data set but could break in unanticipatable ways in the future. No, a more robust solution is needed. Since JSON is native to Javascript, let's use it:

#!/bin/sh
json=$(curl "https://itunes.apple.com/search?term=Five+Iron+Frenzy+Engine+of+a+Million+Plots")
/System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources/jsc -e "var json = $json; json['results'].forEach(function(result) { print(result['trackViewUrl']) });"

This gives us the track view URL for each of the tracks on the album like this:

https://itunes.apple.com/us/album/battle-dancing-unicorns-glitter/id727391260?i=727391810&uo=4
https://itunes.apple.com/us/album/i-am-jacks-smirking-revenge/id727391260?i=727391808&uo=4
https://itunes.apple.com/us/album/so-far/id727391260?i=727391800&uo=4
https://itunes.apple.com/us/album/into-your-veins/id727391260?i=727391812&uo=4
https://itunes.apple.com/us/album/ive-seen-the-sun/id727391260?i=727391815&uo=4
https://itunes.apple.com/us/album/against-a-sea-of-troubles/id727391260?i=727391798&uo=4
https://itunes.apple.com/us/album/it-was-a-dark-stormy-night/id727391260?i=727391814&uo=4
https://itunes.apple.com/us/album/zen-the-art-of-xenophobia/id727391260?i=727391802&uo=4
https://itunes.apple.com/us/album/to-start-a-fire/id727391260?i=727391809&uo=4
https://itunes.apple.com/us/album/blizzards-bygones/id727391260?i=727391816&uo=4
https://itunes.apple.com/us/album/we-own-the-skies/id727391260?i=727391804&uo=4
https://itunes.apple.com/us/album/someone-elses-problem/id727391260?i=727391806&uo=4

With some simple Javascript code, it's easy to see how any desired data can easily be extracted from JSON data structure for further processing. This is a simple but effective way to process JSON data in shell scripts without resorting to fragile regex processing or resorting to other dependencies.