Tag Sort Array of Objects in JavaScript