报告“其他”字段以响应SurveyMonkey

时间:2020-02-13 13:20:47

标签: response surveymonkey

我正在以编程方式创建一个响应以发送到SurveyMonkey。我有一个带有可选文本字段的单选题。我从SurveyMonkey(摘录)中获得了以下内容:

 "answers": {
                    "other": {
                        "text": "Other (please specify)",
                        "id": "2778291068",
                    },
                    "choices": [
                        {
                            "position": 1,
                            "text": "option 1",
                            "quiz_options": {
                                "score": 0
                            },
                            "id": "2778291065"
                        },
                        {
                            "position": 2,
                            "text": "option 2",
                            "quiz_options": {
                                "score": 0
                            },
                            "id": "2778291066"
                        },
                        {
                            "position": 3,
                            "visible": true,
                            "text": "option 3",
                            "quiz_options": {
                                "score": 0
                            },
                            "id": "2778291067"
                        }
                    ]
                }

我从客户端收到了响应,然后尝试编写响应,但是我不知道填写后如何格式化 other 部分。 这个json起作用:

{"pages":[
{"id":"111588651","questions":[
    {"id":"417946972","answers":[
        {"choice_id":"2778291065"}],
    }
    ]}]}

我不应该添加其他部分。

0 个答案:

没有答案