// const transferObj = {
// value: aggregations.all_zg.buckets[i].key,
// label: aggregations.all_zg.buckets[i].key,
// count: aggregations.all_zg.buckets[i].doc_count,
// };
这样对象用结构赋值怎么写我是这样改得 const transferObj
({value,label,count} = {
value: aggregations.all_zg.buckets[i].key, label: aggregations.all_zg.buckets[i].key,
count: aggregations.all_zg.buckets[i].doc_count,
})但是不对,应该怎么写
1 回答
米琪卡哇伊
TA贡献1998条经验 获得超6个赞
const { key: value, key: label, doc_count: count } = aggregations.all_zg.buckets[i];console.log(value, label, count);
添加回答
举报
0/150
提交
取消