Help me with Json

i want to make post request using http here is my json
{
“productName”: “{{step_1[‘values’][‘B’]}}”,
“orderId”: “{{step_1[‘values’][‘A’]}}”,
“quantity”: “{{step_1[‘values’][‘E’]}}”,
“price”: “{{step_1[‘values’][‘C’]}}”
}

but api acpect quantity and price only int and it is sending as string
if i remove “” than I got error
JSON Body is invalid

please help me

Hi

Try the following JSON, Anything between {{ }} is javascript :smiley: so we can use Number()

{
  "productName": "{{step_1['values']['B']}}",
  "orderId": "{{step_1['values']['A']}}",
  "quantity": "{{Number(step_1['values']['E'])}}",
  "price": "{{Number(step_1['values']['C'])}}"
}

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.