convert table structure to list type structure