I have this Array of objects, and I am having problems adding more key-pairs to the objects in typescript.
For Example I have this Array.
accountsOptions:any = [
{'data':
{
'adidas': null,
'google': null
}
}
];
And I want to add more here
accountsOptions:any = [
{'data':
{
'adidas': null,
'google': null,
'nike': null,
'apple': null
}
}
];
the new values are coming from another array, how can I loop(efficiently) this and dynamically add more key-pairs? I am new to typescript.