我正在尝试使用自定义json格式创建流程图。每个对象都会创建一个内部包含数据的流。
我设法先创建,但无法遍历其他json数据数组。
我的json数据:
var processMain = {
"process": [{
"ProcessName" : "Record One",
"Username" : "Joh Doe",
"Created" : "10:00:00",
'records': [
"Titles goes here",
"This is another title"
],
'display': [
{
'question': "Question one",
'answer': "answer goes here"
},
{
'question': "Question Two",
'answer': "answer goes here"
}
]
}],
"chapterOne": [{
"ProcessName" : "Second Record",
"Username" : "Joh Hoe",
"Created" : "10:00:00",
'records': [
"Titles goes here",
"This is another title"
],
'display': [
{
'question': "Question one",
'answer': "answer goes here"
},
{
'question': "Question Two",
'answer': "answer goes here"
}
]
}]
};
我的小提琴显示了到目前为止的工作示例。 https://jsfiddle.net/vickyparab76/y0duk4je/3/
感谢您的帮助。