I have a request that accepts json. Inside the body of the request I would like to use the same dynamic variable twice. So for example:
{
"description": "{{$randomFirstName}}'s Home",
"first_name": "{{$randomFirstName}}",
"first_name": "{{$randomLastName}}",
"more_fields": "..."
}
However simply repeating the variable as above results in a different first name for the description and first_name fields when I would like the value to be the same.
How can I achieve this. I think it should be possible in the pre-request script though if there is someway to do the equivalent of
{
"description": "{{firstName=$randomFirstName}}'s Home",
"first_name": "{{firstName}}",
"first_name": "{{$randomLastName}}",
"more_fields": "..."
}
without bothering with a pre-request script I might prefer that.