Reformat js list