rem: .then(function (results) {   for (var j in results) { var pageData = results[j];  pageData.sort( function (a, b) { if (a.name < b.name) return -1; if (a.name > b.name) return 1; return 0; } );  for (var k in pageData) { if (pageData[k].streams.length > 0) { var category = { service: 'webradio', type: 'webradio', title: pageData[k].name, id: pageData[k].id, artist: '', album: '', icon: 'fa fa-microphone', uri: pageData[k].streams[0].stream }; response.navigation.list.push(category); } } }  defer.resolve(response); }); 
add: }).end(function (response) { callback(null, response.body); }); 
context:         .then(function (results) {            //console.log(results);            for (var j in results) {                var pageData = results[j];                //we sort datas alphabetically by name of station                pageData.sort(                    function (a, b) {                        if (a.name < b.name)                            return -1;                        if (a.name > b.name)                            return 1;                        return 0;                    }                );                for (var k in pageData) {                    if (pageData[k].streams.length > 0) {                        var category = {                            service: 'webradio',                            type: 'webradio',                            title: pageData[k].name,                            id: pageData[k].id,                            artist: '',                            album: '',                            icon: 'fa fa-microphone',                            uri: pageData[k].streams[0].stream                        };                        response.navigation.list.push(category);                    }                }            }            defer.resolve(response);        });
meta: 3465	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3465/8f2f34c69301f73a7aac01293ef777b1425d3659/index.js/clean/app/plugins/music_service/webradio/index.js