angular - angular 4 - 如何以垂直方式显示 json 数组
问题描述
从后端我得到说注释的 json 数组(一个 json 是一个注释),即
[
{
"StrategyName": "ClearBridge Aggresive Growth fund",
"ProductType": "MF",
"FirmName": "ABC",
"Complement": "",
"TakeOver": "",
"PlatformFirm": "",
"PlatformName": "",
"topics": [
{
"title": "Strategy/Objective",
"text": "System to allow Owner modify product notes and save as a new note."
},
{
"title": "People",
"text": "This allows Owner to quickly create a note for different vehicle types by cloning the existing, This allows Owner to quickly create a note for different vehicle types by cloning the existing, This allows Owner to quickly create a note for different vehicle types by cloning the existing"
},
{
"title": "Philosophy/Process",
"text": "Process content"
},
{
"title": "Roles",
"text": "Currently has 40% foreign exposure"
},
{
"title": "Positioning",
"text": " test Positioning content "
},
{
"title": "Composition",
"text": " test Composition content "
},
{
"title": "Performance",
"text": " test Performance content "
},
{
"title": "Current Allocation",
"text": "Current Allocation "
},
{
"title": "Miscellaneous",
"text": "Miscellaneous Content "
}
]
},
{
"StrategyName": "JhanCock Global absolute Ret",
"ProductType": "MF",
"FirmName": "BCD",
"Complement": "",
"TakeOver": "",
"PlatformFirm": "",
"PlatformName": "",
"topics": [
{
"title": "Strategy/Objective",
"text": "test strategy"
},
{
"title": "People",
"text": "test people"
},
{
"title": "Philosophy/Process",
"text": "Process content"
},
{
"title": "Roles",
"text": "Currently has 30% foreign exposure"
},
{
"title": "Positioning",
"text": " test Positioning content 2 "
},
{
"title": "Composition",
"text": " test Composition content 2 "
},
{
"title": "Performance",
"text": " test Performance content 2 "
},
{
"title": "Current Allocation",
"text": "Current Allocation 2 "
},
{
"title": "Miscellaneous",
"text": "Miscellaneous Content 2 "
}
]
}
]
在角度我使用 MaterialTable 。我能够在一行中显示一个注释。
Name、FundType、FirmName、topic1、topic2、topic3(标题行)
ClearBridge 积极成长基金,MF,ABC,topic1, topic2 , topic3 ..
JhanCock 全球绝对 Ret,MF,BCD, topic1, topic2, topic3..
但要求是以垂直方式显示
名称 - ClearBridge Aggressive Growth 基金,JhanCock Global absolute Ret
基金类型 - MF
公司名称 - ABC , BCD
主题1 - 主题1,主题1
主题 2 - 主题 2 , 主题 2
主题 3 - 主题 3,主题 3
数据是 Note 数组,即 Note[] (在 materialtable 中,this.dataSource.data = data as Notes[];)我正在寻找另一个说 NoteDisplay[] 的数组。NotDisplay[] 将具有垂直方式的数据。请指导是否有其他方法可以工作?
解决方案
推荐阅读
- python - 无法使用 folium 更改带时间戳的 geojson 标记的颜色
- vue.js - Vue传单加载时打开弹出窗口
- mysql - 我的 mysql 查询(通过合并、临时列和排序)非常慢
- django - 如果有这样的事情,实现按操作和按行身份验证的最佳方法是什么
- google-bigquery - 使用 Python 客户端的 Google BigQuery API
- vue.js - SCSS 如何加载相对于源文件的样式 url 引用(错误:未找到相关模块)
- javascript - 如何选择具有相同类名的 javaScript 中的所有类?
- c - 在 Windows 10 上的 VSCode 中测试 GLUT 时收到错误消息
- azure - Azure Pipelines YAML - 将变量组用于“部署 Web 应用”azureSubscription 输入时出错
- javascript - 强制 div 溢出而不是调整大小