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.
    – Devang Das
    Jun 23 at 18:02
  • There are a number of Q&As here on SSJS and JSON, here's one. Please do a search.
    – identigral
    Jun 23 at 18:27