代码如下:
var t_tamiStorage = [
{
t_REMARK: "1",
t_SUPPLIER: "",
t_UNIT: "包",
t_binRoom: "A",
t_lotNumber: "00004",
t_materialName: "细胞培养皿",
t_materialNumber: "ZX20230021",
t_putQuantity: "15",
t_specificationModel: "细胞培养皿10个/包",
t_storageLocation: "01-02",
t_validUntil: "2023-05-26"
},
{
t_REMARK: "1",
t_SUPPLIER: "",
t_UNIT: "包",
t_binRoom: "B",
t_lotNumber: "00004",
t_materialName: "细胞培养皿",
t_materialNumber: "ZX20230021",
t_putQuantity: "15",
t_specificationModel: "细胞培养皿10个/包",
t_storageLocation: "01-02",
t_validUntil: "2023-05-26"
}
]
var t_tsliEmpty = [
{
t_REMARK: "王小帅",
t_SUPPLIER: "",
t_UNIT: "包",
t_binRoom: "C",
t_lotNumber: "00002",
t_materialName: "蓝盖试剂瓶",
t_materialNumber: "ZX20230021",
t_putQuantity: "15",
t_specificationModel: "细胞培养皿122个/包",
t_storageLocation: "01-02",
t_validUntil: "2023-05-26"
},
{
t_REMARK: "1",
t_SUPPLIER: "",
t_UNIT: "包",
t_binRoom: "A",
t_lotNumber: "00004",
t_materialName: "细胞培养皿",
t_materialNumber: "ZX20230021",
t_putQuantity: "15",
t_specificationModel: "细胞培养皿10个/包",
t_storageLocation: "01-02",
t_validUntil: "2023-05-26"
}
]
t_binRoom是标识符,现在是想要 A的数据归类在一起, B的数据归类在一起,C的数据归类在一起,A,B,C格式是[{}]
期望将想要 A的数据归类在一起, B的数据归类在一起,C的数据归类在一起,以JSON格式形式,用原生js实现。大佬们,这个该怎么实现呢,谢谢大家
文心一言给出的答案: