-1
如何獲得值和display from below string?如何解析這個特定的json字符串?
[
{
"hdr":"",
"forElement":"",
"preFields":[
],
"rows":[
[
{
"field":"subject_area",
"label":"Subject Area",
"mandatory":"",
"type":"text",
"giveFocus":"",
"reference":"",
"choiceOptions":null,
"refQual":"",
"onChangeFunc":"",
"cellCSS":"",
"labelCSS":"",
"show":"always",
"imageSrc":"",
"value":"helo",
"display":"helods",
"relatedTable":"",
"disabled":false
},
{
"field":"table",
"label":"Table",
"mandatory":"",
"type":"text",
"giveFocus":"",
"reference":"",
"choiceOptions":null,
"refQual":"",
"onChangeFunc":"",
"cellCSS":"",
"labelCSS":"",
"show":"always",
"imageSrc":"",
"value":"helasdsao",
"display":"helo",
"relatedTable":"",
"disabled":false
},
{
"field":"column",
"label":"Column",
"mandatory":"",
"type":"text",
"giveFocus":"",
"reference":"",
"choiceOptions":null,
"refQual":"",
"onChangeFunc":"",
"cellCSS":"",
"labelCSS":"",
"show":"always",
"imageSrc":"",
"value":"hesadslo",
"display":"helo",
"relatedTable":"",
"disabled":false
},
{
"field":"description",
"label":"Description",
"mandatory":"",
"type":"text",
"giveFocus":"",
"reference":"",
"choiceOptions":null,
"refQual":"",
"onChangeFunc":"",
"cellCSS":"",
"labelCSS":"",
"show":"always",
"imageSrc":"",
"value":"helo",
"display":"hedsadlo",
"relatedTable":"",
"disabled":false
}
]
]
}
]
什麼編程語言?你期望什麼樣的數據結構?你試過什麼了? – Ruud
我正在試圖在JavaScript中。 – user3781360
那麼,由於沒有名爲'values'的字段,您將無法得到它。對於'陳列'你需要剝洋蔥。最外層是一個數組,然後你有一個對象,另外兩個數組,以及另一個要剝離的對象。 –