You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We would like to get elements with getFromJson without the array wrapper []
Example: { "firstName": "John", "lastName": "doe", "age": 26, "address": { "streetAddress": "naist street", "city": "Nara", "postalCode": "630-0192" }, "phoneNumbers": [ { "type": "iPhone", "number": "0123-4567-8888" }, { "type": "home", "number": "0123-4567-8910" } ] }
With this Json path: $.phoneNumbers[0].number
What we currently get: ["0123-4567-8888"]
What we want to get:
"0123-4567-8888"
What we normally do is use a getFromGroovy property to remove the square brackets and get exacly the value we want.
This is blocking for us because we have several values that we want to retreive from different services responses and use in the request of a different service.
For instance, for the test that I'm working on, I need to retrieve more than 24 values.
Is it possible to add this modification to the getFromJson property?
Thank you in advance.
The text was updated successfully, but these errors were encountered:
Seems very relevant to me.
The only big warning is that such a change will need test refactoring when deployed.
We will probably need to manage that change of behaviour with a new parameter that will allow users to desactivate it until the refactoring effort is done.
Hello,
We would like to get elements with getFromJson without the array wrapper []
Example:
{ "firstName": "John", "lastName": "doe", "age": 26, "address": { "streetAddress": "naist street", "city": "Nara", "postalCode": "630-0192" }, "phoneNumbers": [ { "type": "iPhone", "number": "0123-4567-8888" }, { "type": "home", "number": "0123-4567-8910" } ] }
With this Json path: $.phoneNumbers[0].number
What we currently get:
["0123-4567-8888"]
What we want to get:
"0123-4567-8888"
What we normally do is use a getFromGroovy property to remove the square brackets and get exacly the value we want.
This is blocking for us because we have several values that we want to retreive from different services responses and use in the request of a different service.
For instance, for the test that I'm working on, I need to retrieve more than 24 values.
Is it possible to add this modification to the getFromJson property?
Thank you in advance.
The text was updated successfully, but these errors were encountered: