我本地写了个json文件叫demo.js,然后我想ng-repeat里面的数据。现在遇到的问题是:
我不知道怎么循环出roles的数据。
{
"demoData": [
{
"dp": "aaa1",
"name": "用户名1",
"number": "11111",
"score": "22222",
"salary": "11111",
"jobs": "scripts",
"roles": [
{
"new": "bbb",
"edit": "ddd",
"ccc": "aaaa",
"del": "dddd"
}
],
"other": "备注",
"action": "删除"
},
{
"dp": "bbb",
"name": "用户名1",
"number": "11111",
"score": "22222",
"salary": "11111",
"jobs": "scripts",
"roles": [
{
"new": "bbb",
"edit": "ddd",
"ccc": "aaaa",
"del": "dddd"
}
],
"other": "备注",
"action": "删除"
}
]
}
两层嵌套即可解决
嵌套循环