Is it possible to use something similar to the destructing assignment
feature in ES6
to write cleaner code when pushing items into an array? I'm unsure how to implement it properly, especially within a context like Vue.js. Here is an example code snippet written in Vue.js:
result.map((item) => {
this.virtualWallets.push({
credit: item.credit,
type: item.type,
name: item.name,
symbol: item.symbol,
image: item.image,
address: item.address,
address_tag: item.address_tag,
auto_transfer: item.auto_transfer,
});
});