Sort the array using any property of an object inside the array