sort json attributes when printing