Check out my form at this link: http://jsfiddle.net/sxGtM/4743/. Upon submitting the form, I need to generate a JSON object with the following structure:
data = {
'voted_questions': [question.pk, question.pk, question.pk, question.pk],
'answers': [
{
'question': question.pk,
'option': option.pk,
},
{
'question': question.pk,
'option': option.pk,
},
]
}
The values of question.pk and option.pk are numerical identifiers for each question and option (essentially their IDs). Can anyone provide guidance on how to create this JSON format?