I know this is silly question but I unable to do it. I declare variable arr=[]; and i'm pushing object value dynamically. But no luck. I want array in following format
arr[
{name:"abc"},
{name:"pqr"}
];
But I unable to get in above format. My code is:
var arr= [];
for (let i = 1; i < 100; i++) {
let lg= {
name:list[i]
};
arr.push(lg);
}
Where i'm doing wrong. Please help me.
listandlog??