I'm new to soapui and I'm trying to do a property transfer of the element in the list options which ha selected = true. The response is in JSON and I can select the element with the code $.response.optionList[0].options[1].id but rather then give the element number I would like to choose whichever has selected = true. Is this something you do with a groovy script? Does anyone have any suggestion?
{
"response": {
"optionList": [
{
"options": [
{
"id": 10,
"selected": false
},
{
"id": 11,
"selected": true
}
]
},
{
"options": [
{
"id": 12,
"selected": false
}]
}
]
}
}