datalist: [
{categoryId: "f5665104-cff9-47c9-b44c-b92694e45767", categoryName: "热销商品"},
{categoryId: "f5665104-cff9-47c9-b44c-b92694e45767", categoryName: "热销商品"},
{categoryId: "f5665104-cff9-47c9-b44c-b92694e45767", categoryName: "热销商品"},
{categoryId: "f5665104-cff9-47c9-b44c-b92694e45767", categoryName: "推荐商品"},
{categoryId: "f5665104-cff9-47c9-b44c-b92694e45767", categoryName: "推荐商品"},
{categoryId: "f5665104-cff9-47c9-b44c-b92694e45767", categoryName: "促销商品"},
{categoryId: "f5665104-cff9-47c9-b44c-b92694e45767", categoryName: "促销商品"},
{categoryId: "f5665104-cff9-47c9-b44c-b92694e45767", categoryName: "促销商品"},
……
]
按照categoryName的不同拆分成几个数组。应该怎么写?
[{categoryId: "f5665104-cff9-47c9-b44c-b92694e45767", categoryName: "热销商品"},
{categoryId: "f5665104-cff9-47c9-b44c-b92694e45767", categoryName: "热销商品"},
{categoryId: "f5665104-cff9-47c9-b44c-b92694e45767", categoryName: "热销商品"},];
[{categoryId: "f5665104-cff9-47c9-b44c-b92694e45767", categoryName: "推荐商品"},
{categoryId: "f5665104-cff9-47c9-b44c-b92694e45767", categoryName: "推荐商品"},]
[{categoryId: "f5665104-cff9-47c9-b44c-b92694e45767", categoryName: "促销商品"},
{categoryId: "f5665104-cff9-47c9-b44c-b92694e45767", categoryName: "促销商品"},
{categoryId: "f5665104-cff9-47c9-b44c-b92694e45767", categoryName: "促销商品"},]
下面快点