Made the output of db.objects() order by the values