【发布时间】:2016-11-04 00:35:23
【问题描述】:
我正在尝试直接访问 JSON 对象属性并记录它,这是我的功能:
loadProcesses(filter?){
this._postService.getAllProcess(filter)
.subscribe(
res=> {
this.processListe = res;
// console.log(this.processListe.)
}
,null,
() =>{
console.log("get processes liste" + filter)
});
所以this.processListe包含一个JSON Object,而我的JSON格式是这样的:
{"Person": {
"id": "A256",
"name": "GET",
"status": "active",
"description": "hardworking, openminded",
...
所以它将包含完全相同的内容,例如,如果我想简单地在控制台日志上打印标签,我该怎么做??
【问题讨论】:
-
我在下面的回复中添加了一个更好的解决方案:)
标签: json typescript angular