I am using angular chosen for listing the options.but how to use ng-options for nested array?
<select chosen
option="countries"
ng-model="data"
ng-options="??">
</select>
this is my array.
$scope.data= [
{
"Name": "Cat1",
"CategoryID": "1",
"actions": [
{
"ActionName": "action1",
},
{
"ActionName": "action2",
}
]
},
{
"Name": "cat 2",
"actions": [
{
"ActionName": "action3",
},
{
"ActionName": "action4",
}
]
}
{
"Name": "cat 3",
"actions": [
{
"ActionName": "action5",
},
{
"ActionName": "actions 5",
}
]
}
]
I want to list the option group by category name lie this
cat1
action1
action2
cat2
action3
action4
cat3
action5
action6