【发布时间】:2015-10-27 11:16:45
【问题描述】:
我有这个 JSON 列表:
[{
"password" : "ppp",
"function" : 0,
"id" : 1,
"login" : "ness",
"nom" : "nesrine",
"mail" : "nes@gmail",
"tel" : "238555555"
},
{
"password" : "pass",
"function" : 0,
"id" : 2,
"login" : "bilel.troudi",
"nom" : "bilel",
"mail" : "bilel.troudi91@gmail",
"tel" : null
},
{
"password" : "undefined",
"function" : 1,
"id" : 4,
"login" : "undefined",
"nom" : "ahmed",
"mail" : "ahmed@gmail.com",
"tel" : "221474"
},
{
"password" : "khm",
"function" : 0,
"id" : 5,
"login" : "khm",
"nom" : "khmayes",
"mail" : "bke@live.fr",
"tel" : "235684522"
}
]
我想用 angular 检索用户的名称(名义)我在我的代码中的一个变量中恢复了这个列表。
【问题讨论】:
-
这里的关键字是Javascript中的
Array和Object。熟悉这些数据结构,您将轻松实现您想要做的事情。