// const transferObj = {
// value: aggregations.all_zg.buckets[i].key,
// label: aggregations.all_zg.buckets[i].key,
// count: aggregations.all_zg.buckets[i].doc_count,
// };
this is how I changed it
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,
})
but no, how should I write