var i;
for (i = 0; i < account.feed.data.length; i++) {
const rendernew = Object.assign(render ,{account_post_VARIABLE I HERE: `${account.feed.data[i].id}`});
}
I would like to make it so once it loops is changes the attribute so it adds a new line instead of re writing the value of the attribute. Any ideas, Thanks!!! :)
Expected Output:
{
account_post_0: "1234"
account_post_1: "5678"
account_post_2: "9012"
}
{["account_post_"+i]: `${account.feed.data[i].id}`}