Reputation: 481
I am trying since half day to get the count of the JSON array Response in a Transfer variable using SoapUi (Basic Version 5.2.1). - please see screen shot
I get as a response of a REST API as a JSON array and want to get the number of all attribute rel
in Json Record (In soapUI by passing it in to a Transfer propertystep) - please see screenshot.
Can someone help me to resolve this issue? Thanks for any support!
I have already tried the following but no success:
($..links[?(@.href == '/admin/verfahren')].rel).length()
($..links[?(@.href == '/admin/verfahren')].rel).length
($..links[?(@.href == '/admin/verfahren')].rel).size()
($..links[?(@.href == '/admin/verfahren')].rel).size
In all case, I get an empty response [[]]
count($..links[?(@.href == '/admin/verfahren')].rel)
In this case also nothing.
Here is one record of REST API JSON response:
[
{
"dto_id": 1,
"bezeichnung": "ABBA",
"itnummer": null,
"verfahrenskategorie": {
"dto_id": 3,
"Schluessel": "B",
"bezeichnung": "Best-Effort",
"links": []
},
"berechtigteADGruppe": "Administrators",
"verfahrensKuerzel": null,
"links": [
{
"rel": "create",
"href": "/admin/verfahren",
"hreflang": null,
"media": null,
"title": null,
"type": null,
"deprecation": null
},
{
"rel": "self",
"href": "/admin/verfahren/1",
"hreflang": null,
"media": null,
"title": null,
"type": null,
"deprecation": null
},
{
"rel": "update",
"href": "/admin/verfahren/1",
"hreflang": null,
"media": null,
"title": null,
"type": null,
"deprecation": null
},
{
"rel": "delete",
"href": "/admin/verfahren/1",
"hreflang": null,
"media": null,
"title": null,
"type": null,
"deprecation": null
}
]
},
{.......
.......
]
And here also the response what I am trying to get the count of it:
[[creat, creat, creat , ......] - see screenshot
Upvotes: 3
Views: 513