Hey everyone, just wondering if this is possible w...
# general
g
Hey everyone, just wondering if this is possible when creating a stub json file. Is it possible to return in within a response body, a value that's identified from a request body. For example:
Copy code
Request: {{URL}}
Request Body: {
    "customer": "${this_value}"
}
Response Body: {
   "key1": "value1",
    "key2": "${this_value}"
}
t
Yes, the best way to do that is usually to use the
jsonPath
helper like this:
Copy code
{{{jsonPath request.body '$.customer'}}}
g
Awesome, thank you @Tom. By the way, good presentation on WireMock Cloud in December last year.
t
Thanks 🙂