My question is in regards to the following function:
function loadConfigurations(configs){
console.log(configs);
}
The 'configs' object that the loadConfigurations function receives, contains two properties --two arrays one called "assigned" the other called "unassigned". And executing console.log(configs) outputs the following:
"Object{assigned: Array[5], unassigned: Array[1]}"
Now I want to enumerate the key-value pairs of each property in both the 'assigned' array and the 'unassigned array'.
The configs object is structured in the following way:
Sorry fellas. This is the structure of the 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 do I do this?
Thanks, CM