Variable call

Hello How can I call the variable on my JSON Body
for example {“AccountNumber”: +ListOfAccNumberAPI}


Please try this

"{""AccountNumber"":""" + ListOfAccNumberAPI + """}"

in here listOfAccNumberAPI value will be "1234455678"

or is the ListOfAccNumberAPi is an actual list? and you want to pass as Json Array? if so

"{""AccountNumber"":[" + String.Join(",",ListOfAccNumberAPI) + "]}"


"{""AccountNumber"":[""" + String.Join(""",""",ListOfAccNumberAPI) + """]}"




ListOfAccNumberAPi is a list, like hundreds of data.

not work for me, but thank you for the HELP


So you want to json array of string?

if yes then pass as above


why do we need to double quote the key and value?


In a json string the key is a string and is surrounded by double quotes…as per syntax…and in a string to escape a double quote we use double soublequotes


1 Like

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