I am trying to POST JSON data using HTTP POST sampler in Jmeter. My data has few values which need to be passed based on results from previous samplers. Below is the sample data and I need is, last name and date from a previous GET Response.
{"people":{"primaryPerson":{"id":"1234","date":"2018-02-13",firstName":"Mr","lastName":"apple-eye","birthday":"1980-1-1","gender":"MALE","personType":"PRIMARY"}}
I have json extractors in the previous sampler to extract all 3 values but I don't know how to use them with body data upload. I am using
{__FileToString(${__eval(${fileName})},,)} to upload the above data.
In short, I need to know how I can replace ID, LASTNAME and DATE using the previous sampler extracted data when I am passing data in a file.