var array = [
{'key' : '1', 'title' : 'title', 'source' : 'path/to/image', 'album' : 'album1'},
{'key' : '1', 'title' : 'title', 'source' : 'path/to/image', 'album' : 'album2'},
{'key' : '1', 'title' : 'title', 'source' : 'path/to/image', 'album' : 'album3'},
{'key' : '1', 'title' : 'title', 'source' : 'path/to/image', 'album' : 'album6'},
{'key' : '1', 'title' : 'title', 'source' : 'path/to/image', 'album' : 'album5'},
{'key' : '1', 'title' : 'title', 'source' : 'path/to/image', 'album' : 'album7'},
{'key' : '1', 'title' : 'title', 'source' : 'path/to/image', 'album' : 'album6'}
];
array.sort(function(a,b){ return a.album > b.album;} );
console.log(array);
http://jsbin.com/xefujehe/1/
source
share