angular中的printjs,在另一个json中具有json对象属性

angular中的printjs,在另一个json中具有json对象属性,angular,printjs,Angular,Printjs,我使用printJs库在属性中打印,我添加了JSON对象属性,它工作正常,但如果JSON对象中包含一个JSON对象,它将显示[object object]。谁能告诉我解决办法吗 PrintJS({ printable: printIndexes, properties: ['reporter', 'entryTime', 'exitTime', 'status'], type: 'json', gridHeaderStyle: 'color: red; border: 2

我使用printJs库在属性中打印,我添加了JSON对象属性,它工作正常,但如果JSON对象中包含一个JSON对象,它将显示
[object object]
。谁能告诉我解决办法吗

 PrintJS({

  printable: printIndexes,
  properties: ['reporter', 'entryTime', 'exitTime', 'status'],

  type: 'json',
  gridHeaderStyle: 'color: red;  border: 2px solid #3971A5;',
  gridStyle: 'border: 2px solid #3971A5;',
  header: 'List of master index'


请看这张图片,它显示的样子像
[object object]
在那里我想显示名称。

遍历对象的内部深度 例如:

 printJS({
  printable: printIndexes,
  properties: ['reporter.name', 'entryTime', 'exitTime', 'status.value'],
  type: 'json',
  gridHeaderStyle: 'color: red;  border: 2px solid #3971A5;',
  gridStyle: 'border: 2px solid #3971A5;',
  header: 'List of master index'
});
用户:{
姓名:'xxx',
地址:{
建筑:{
编号:64,
街道:科林德
},
城市:“德克萨斯”
}

}
您可以告诉PrintJS应该打印嵌套对象中的哪个属性。例如:

 printJS({
  printable: printIndexes,
  properties: ['reporter.name', 'entryTime', 'exitTime', 'status.value'],
  type: 'json',
  gridHeaderStyle: 'color: red;  border: 2px solid #3971A5;',
  gridStyle: 'border: 2px solid #3971A5;',
  header: 'List of master index'
});
以下是从嵌套对象打印数据的小提琴示例: