Prasenjit Dutta

06/16/2023, 6:35 PM
Hello All, Facing an issue while write the stubs in json, in mapping file when the requests are written in nested block like "bodyPatterns": [ { "equalToJson": {"quantity": {"value": "${json-unit.any-number}", "unit": "${json-unit.any-string}"}, "enforce_quantity": "${json-unit.any-boolean}","provisioning_metadata": [{"name": "region","value": "${json-unit.any-string}"}]} } ] and in the response when it is used as jsonpath "quantity": { "value": {{jsonPath request.body '$.value'}}, "unit": "{{jsonPath request.body '$.unit'}}" }, on execution, output coming as empty value like the below one "quantity": { "value": , "unit": "" }, Can some one help me to explain what is going wrong over here?

Oleg Nenashev

06/16/2023, 7:03 PM
Not sure. What is your actual request. I would assume one jsonPath level is missing