假设我有一个像这样的数组:
let bodyDataAnswer = {
'answers':[{
'question_id':this.verifyCustomer.questions[0].id,
'int_result':this.verifyCustomer.questions[0].answer_template.answers["0"].int_result,
'string_result': this.verifyCustomer.questions[0].answer_template.answers["0"].string_result
},
{
'question_id':this.verifyCustomer.questions[1].id,
'int_result':this.verifyCustomer.questions[1].answer_template.answers["0"].int_result,
'string_result': this.verifyCustomer.questions[1].answer_template.answers["0"].string_result,
},
{
'question_id':this.verifyCustomer.questions[2].id,
'int_result': this.verifyCustomer.questions[2].answer_template.answers["0"].int_result,
'string_result':this.verifyCustomer.questions[2].answer_template.answers["0"].string_result
}
]
}
有什么方法可以使用for循环吗?因为下次这会更大
答案 0 :(得分:1)
vlan_number