我正在使用2个restapi服务。第一个将从名为“主要类别”的列表中获取项目,如下所示:-/test/_api/web/lists/getbytitle('MainCategory')/items?$select=Title它将返回以下json:-{"d":{"results":[{"FileSystemObjectType":0,"Id":15,"ID":15,"ContentTypeId":"0x010006DDBDD3BDC9914B92E911733F2A56E1","Title":"A","Modified":"2017-03-01T12:08:35Z","Created":
我正在做一些聚合以获得关于类别中有多少产品的一些统计数据。经过一些管道后我归结为:[{topCategory:"Computer",mainCategory:"Stationary"},{topCategory:"Computer",mainCategory:"Laptop"},{topCategory:"Computer",mainCategory:"Stationary"},{topCategory:"Computer",mainCategory:"Stationary"},]想要的输出:[{name:"Computer",count:4,mainCategories:[{name