I am trying to list my blog posts under a specific label in alphabetic order. Since I am not a programmer, I found this code from internet, which lists all my posts labeled "subtitles" in a chronological order. I didn't find any way to sort the result in alphabetic order. Previously I was using yahoo pipes for this purpose, since yahoo pipe no longer exists this kind of code is very much needed. Any other code which might give the proposed result is also appreciated.
<!-- Recent Posts by Label Start -->
<script type="text/javascript">
function recentpostslist(json) {
document.write('<ol>');
for (var i = 0; i < json.feed.entry.length; i++)
{
for (var j = 0; j < json.feed.entry[i].link.length; j++) {
if (json.feed.entry[i].link[j].rel == 'alternate') {
break;
}
}
var entryUrl = "'" + json.feed.entry[i].link[j].href + "'";//bs
var entryTitle = json.feed.entry[i].title.$t;
var item = "<li>" + "<a href="+ entryUrl + '" target="_blank">' + entryTitle + "</a> </li>";
document.write(item);
}
document.write('</ol>');
}
</script>
<script src="http://www.malayalamsubtitles.org/feeds/posts/summary/-/subtitles?max-results=500&alt=json-in-script&callback=recentpostslist"> </script>
<!-- Recent Posts by Label End -->