【发布时间】:2012-10-28 08:58:05
【问题描述】:
我有以下类型的 JSON 数据
[
{"Col1": "Server1", "Col2": "57", "Col3": "Create", "Col4": "Details" },
{"Col1": "Server2", "Col2": "27", "Col3": "Create", "Col4": "Details" },
{"Col1": "Server3", "Col2": "89", "Col3": "Create", "Col4": "Details" },
{"Col1": "Server4", "Col2": "75", "Col3": "Create", "Col4": "Details" },
{"Col1": "Server5", "Col2": "77", "Col3": "Create", "Col4": "Details" },
{"Col1": "Server6", "Col2": "55", "Col3": "Create", "Col4": "Details" }
]
现在我需要的是某个数组中的 Col1、Col2、Col3 和 Col4,以便我可以将它们作为标题放入我需要创建的动态表中。 关于如何在数组中获取这些值的任何想法?
【问题讨论】:
-
我只需要标题名称,例如上述示例中的 Col1 Col2 Col3 Col4
-
您需要将它们中的每一个放在一个单独的数组中吗??
-
每一个??我只需要一个数组中的 COL1、COL2、COL3、COL4,这样我就可以将它们用作我的表格的标题