We have a set of 3 icons in 3 pairs. We need to find out which icon people prefer and determine the top icon out of the set. We ask performers to look at the icons and choose the one they prefer and then we aggregate these results to obtain the top icon. Here’s what this might look like:
{
"view": {
"type": "view.list",
"items": [
{
"type": "layout.side-by-side",
"items": [
{
"type": "view.image",
"url": {
"type": "data.input",
"path": "image_left"
}
},
{
"type": "view.image",
"url": {
"type": "data.input",
"path": "image_right"
}
}
],
"controls": {
"type": "view.list",
"items": [
{
"type": "field.radio-group",
"label": "Which icon do you like more?",
"options": [
{
"label": "Left",
"value": "LEFT"
},
{
"label": "Right",
"value": "RIGHT"
},
{
"label": "Loading error",
"value": "404"
}
],
"data": {
"type": "data.output",
"path": "result"
},
"validation": {
"type": "condition.required"
}
}
]
}
}
]
},
"plugins": [
{
"1": {
"type": "action.set",
"data": {
"type": "data.output",
"path": "result"
},
"payload": "LEFT"
},
"2": {
"type": "action.set",
"data": {
"type": "data.output",
"path": "result"
},
"payload": "RIGHT"
},
"3": {
"type": "action.set",
"data": {
"type": "data.output",
"path": "result"
},
"payload": "404"
},
"type": "plugin.hotkeys"
}
]
}