Skip to content

Instantly share code, notes, and snippets.

@webdawe
Last active September 6, 2021 23:20
Show Gist options
  • Save webdawe/d6367b9a9288ddcf9e0b97728577d164 to your computer and use it in GitHub Desktop.
Save webdawe/d6367b9a9288ddcf9e0b97728577d164 to your computer and use it in GitHub Desktop.
sample
[
{
"id": 1,
"number": 1,
"survey_id": 1,
"label": "How likely are you to recommend us to a friend or colleague?",
"identifier": "how-likely-are-you-to-recommend-us-to-a-friend-or-colleague",
"answer_options": {
"label": "",
"options": [
{
"title": 0,
"identifier": "0",
"show": true
},
{
"title": 1,
"identifier": "1",
"show": true
},
{
"title": 2,
"identifier": "2",
"show": true
},
{
"title": 3,
"identifier": "3",
"show": true
},
{
"title": 4,
"identifier": "4",
"show": true
},
{
"title": 5,
"identifier": "5",
"show": true
},
{
"title": 6,
"identifier": "6",
"show": true
},
{
"title": 7,
"identifier": "7",
"show": true
},
{
"title": 8,
"identifier": "8",
"show": true
},
{
"title": 9,
"identifier": "9",
"show": true
},
{
"title": 10,
"identifier": "10",
"show": true
}
],
"rules": {
"skip_rules": [
{
"condition": {
"attribute": "identifier",
"operator": "LTE",
"value": 3
},
"action": {
"type": "to_question",
"value": 4
}
},
{
"condition": {
"attribute": "identifier",
"operator": "GTE",
"value": 8
},
"action": {
"type": "to_question",
"value": 3
}
}
]
}
}
},
{
"id": 2,
"number": 2,
"survey_id": 1,
"label": "Choose the option that best describes your job role.",
"identifier": "choose-the-option-that-best-describes-your-job-role",
"answer_options": {
"label": "",
"options": [
{
"title": "Individual Contributor",
"identifier": "individual-contributor",
"show": true
},
{
"title": "Manager",
"identifier": "manager",
"show": true
},
{
"title": "Executive",
"identifier": "executive",
"show": true
},
{
"title": "Founder",
"identifier": "founder",
"show": true
}
],
"rules": null
}
},
{
"id": 3,
"number": 3,
"survey_id": 1,
"label": "How many employees does your company have?",
"identifier": "how-many-employees-does-your-company-have",
"answer_options": {
"label": "",
"options": [
{
"title": "1-10",
"identifier": "1-10",
"show": true
},
{
"title": "11-50",
"identifier": "11-50",
"show": true
},
{
"title": "51-500",
"identifier": "51-500",
"show": true
},
{
"title": "501-10,000",
"identifier": "501-10000",
"show": true
},
{
"title": "10,000+",
"identifier": "10000",
"show": true
}
],
"rules": null
}
},
{
"id": 4,
"number": 4,
"survey_id": 1,
"label": "Last Question",
"identifier": "last-question",
"answer_options": {
"label": "",
"options": null,
"rules": null
}
},
{
"id": 5,
"number": 5,
"survey_id": 1,
"label": "which ice cream flavours you have purchased in the past 6 months",
"identifier": "which-ice-cream-flavours-you-have-purchased-in-the-past-6-months",
"answer_options": {
"label": "",
"options": [
{
"title": "Vanilla",
"identifier": "vanilla",
"show": true
},
{
"title": "Chocolate",
"identifier": "chocolate",
"show": true
},
{
"title": "Strawberry",
"identifier": "strawberry",
"show": true
},
{
"title": "Mint Chip",
"identifier": "mint-chip",
"show": true
}
],
"rules": {
"option_toggle": [
{
"condition": {
"attribute": "identifier",
"operator": "LTE",
"value": "vanillla"
},
"action": {
"type": "DISABLE",
"value": 3
}
},
{
"condition": {
"attribute": "identifier",
"operator": "LTE",
"value": "chocolate"
},
"action": {
"type": "HIDE",
"value": 4
}
}
]
}
}
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment