My question is regarding the following function:
function loadConfigurations(configs){
console.log(configs);
}
The 'configs' object, which the loadConfigurations function receives, contains two properties - two arrays, one of which is called "assigned" to the other, called "unassigned". Running console.log (configs) produces the following:
"Object{assigned: Array[5], unassigned: Array[1]}"
Now I want to list the key-value pairs of each property in both the “assigned” array and the “unrecognized array”.
The configs object is structured as follows:
Sorry guys. This is the structure of configs objects:
var configs = {
"config1":
{
"assigned": [
{
"name": "Admin Usersss",
"value": "admin-user"
},
{
"name": "MPR User",
"value": "mpr-user"
},
{
"name": "SAMHSA User",
"value": "samhsa-user"
}
],
"unassigned": [
{
"name": "States User",
"value": "states-user"
},
{
"name": "All States User",
"value": "all-states-user"
},
{
"name": "Substance Abuse User",
"value": "substance-abuse-user"
}
]
},
"config2":
{
"assigned": [
{
"name": "Admin User",
"value": "admin-user"
},
{
"name": "MPR User",
"value": "mpr-user"
},
{
"name": "SAMHSA User",
"value": "samhsa-user"
},
{
"name": "States User",
"value": "states-user"
},
{
"name": "All States User",
"value": "all-states-user"
}
],
"unassigned": [
{
"name": "Substance Abuse User",
"value": "substance-abuse-user"
}
]
},
"config3":
{
"assigned": [
{
"name": "Admin User",
"value": "admin-user"
}
],
"unassigned": [
{
"name": "States User",
"value": "states-user"
},
{
"name": "All States User",
"value": "all-states-user"
},
{
"name": "Substance Abuse User",
"value": "substance-abuse-user"
},
{
"name": "MPR User",
"value": "mpr-user"
},
{
"name": "SAMHSA User",
"value": "samhsa-user"
}
]
}
How to do it?
Thanks CM