"default_tabs" : [
{
"value" : "Ice"
},
{
"value" : "Gold"
}
]
I want to assign this values into another array in such a way that it should look like below
selected_values : [{"values" : { "Ice" : "Edit","Gold" : "Edit" },"role" : "Admin"}]
for this i prepared the below,
default_tabs.forEach(function(i,v){
selected_values.push('values':v)
})
I know i am wrong can anyone help me please.Thanks.