0

我有这样的json数据

FixedFields: {
"DocType": {
  "fieldValueOnChange": "",
  "operatorStyle": "width:80%",
  "fieldType": "Fixed",
  "operatorOnChange": "selectFixedFieldType(this);",
  "contextpath": "/iTunes",
  "validations": {
    "alphaNumeric": {

    }
  },
  "fieldValueType": "text",
  "OperatorTypes": {
    "not equals to": "text",
    "equal to": "text",
    "paste list": "textarea",
    "starts with": "text",
    "contains": "text"
  },
  "fieldValueStyle": "width:90%"
},
"Amount": {
  "fieldValueOnChange": "",
  "operatorStyle": "width:80%",
  "fieldType": "Fixed",
  "operatorOnChange": "selectFixedFieldType(this);",
  "contextpath": "/iTunes",
  "validations": {
    "numericDouble": {
      "limit": "16"
    }
  },
  "fieldValueType": "text",
  "OperatorTypes": {
    "equal to": "text",
    "not equals to": "text",
    "between": "textbetween",
    "less than": "text",
    "less than or equal to": "text",
    "greater than": "text",
    "greater than or equal to": "text"
  },
  "fieldValueStyle": "width:35%;"
}
}

问题是我想识别标签名称和值并在 mustache 模板中呈现,但我不知道我的 Web 服务响应中的 JSON 结构会是什么样子。

我知道它可以通过 json 解析来完成

for(key in array) {...} 

对于我不确定结构的数据,我如何在 mustache 中进行模板化?提前致谢

4

0 回答 0