0

I need to create a json payload to send data in this format

{
   "ids":[
      "6375502",
       "637550",
      "6376391"
   ],
   "type":"MrnId",
   "extId":"104DC758-25AE-47A8-931A-DD9DC1637049"
}

How should I write the payload? One sample is below -

var payload = '{"ids":arr,"type":"MrnId",
   "extId":"104DC758-25AE-47A8-931A-DD9DC1637049"}';

here arr is the array of ids

2
  • I'm writing the code in ssjs for an HTTP post request. Any ssjs resources will be really helpful. Commented Jun 23, 2021 at 18:02
  • There are a number of Q&As here on SSJS and JSON, here's one. Please do a search. Commented Jun 23, 2021 at 18:27

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.