어떤이 구조의 라인을 따라 뭔가에 대해 :
{
"Questions" :
[
{
"QuestionNumber": "Q1",
"QuestionType" : "YESNO",
"QuestionText" : "Are you happy today?",
"Answers" :
[
{
"Text" : "YES",
"NextQuestionIfAnswered" : "Q9"
},
{
"Text" : "No",
"NextQuestionIfAnswered" : "Q2"
}
],
},
{
"QuestionNumber": "Q2",
"QuestionType" : "MULTIPLE",
"QuestionText" : "Why aren't you happy?",
"Answers" :
[
{
"Text" : "Dog died",
"NextQuestionIfAnswered" : ""
},
{
"Text" : "I'm just generally sad",
"NextQuestionIfAnswered" : ""
}
],
},
{
"QuestionNumber": "Q9",
"QuestionType" : "TEXTBOX",
"QuestionText" : "Type why you are happy into the box below",
"Answers" : []
}
]
}
그래서
당신이 질문의 배열, 질문 번호, (결정을 렌더링하는 데 사용) 질문 유형과 각하고 가능한 답의 각이 지정된 답을 선택한 경우 탐색 할 질문 번호가 포함됩니다.
배열의 각 "답변"에 userAnswer 속성을 추가하여이 질문에 대한 사용자의 답변을이 문서에 저장할 수도 있습니다. 그러나 사용자 수에 따라 별도의 컬렉션에 보관해야 할 수 있습니다.