Python Sort Object Array Javascript Methods And Functions