A simple program that sorts JavaScript Objects based on multiple keys