-
-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[LR] getFromJson without array wrapper #2495
Comments
Seems very relevant to me. |
ok, noted, thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: