title: Variable in JSON stringify will not work in Rest request
body: <p>I am trying to send a request to a REST API and Im using Javascript to prepare and send it. However when I use JSON.Stringify to write out the variables needed from an object the API says Im missing required fields.</p>
  
  <p>Ive tried writing the object to a string then including it in the code, and I have tried just adding JSON.Stringify to the code. Nothing works.</p>
  
  <p>I build an array "Data" from posted fields in a form like so:</p>
  
  <pre><code>var Data = {};
  var fields;
  var fieldName;
  var fieldValue;
  var fieldValueCleaned;
  var emailCleaned;
  var stingForJson;
  stingForJson = "";
  for(var i = 0; i &lt; types.length; i++){
  
    fields = types[i].split("=");
    fieldName = fields[0];
    fieldValue = CleanupInj(fields[1]);
    fieldValue = decodeURIComponent(fieldValue);
    fieldValueCleaned = CleanUp(fieldValue);
  
    Data[fieldName] = fieldValueCleaned; 
  
    console.log( fieldName +" : "+ fieldValueCleaned);
  
  
  }
  </code></pre>
  
  <p>If I write JSON.stringify({Data}) to the console it comes our correctly:</p>
  
  <pre><code>{
  Data: {
          "Field1": "123562374563",
          "Field2": "https://giphy.com/gifs/borat-great-success-a0h7sAqON67nO/fullscreen",
          "Field3": "https://giphy.com/gifs/haZOqHKz9tTfW/fullscreen",
          "Field4": "My@email.com",
          "Field5": "Thisisme"
      }
  }
  </code></pre>
  
  <p>However when I add the variable to the code to do the request, it dosent work (as below)</p>
  
  <pre><code>fetch('https://MYAPIURL/v1/events', {
          method: "POST",
          cache: "no-cache",
          headers: {
              "Content-Type": "application/json",
              "Authorization": "Bearer " : "12321321321321",
          },
          body: JSON.stringify({
            "Field1": Data.Field1,
            "Field5": Data.Field5,
  
          }),
    Data: JSON.stringify({Data}),
      }
       )
    .then(function(res) {
      return res.json();
    }).then(function(json) {
      callback(null, json);
    });
  </code></pre>
  
  <p>It dosent work because the values in Data are not sent to the server.</p>
  
  <p>I have even tried writing the object to a string then using JSON.stringify to put it back to a json object:</p>
  
  <pre><code>stingForJson = JSON.stringify({Data});
  stingForJson = stingForJson.slice(9,-2);
  console.log("String for JSON = "+ stingForJson);
  
  fetch('https://mc-hz56jzqd8k6ldx1sm7-s7xfbm.rest.marketingcloudapis.com/interaction/v1/events', {
          method: "POST",
          cache: "no-cache",
          headers: {
              "Content-Type": "application/json",
              "Authorization": "Bearer " + accessToken,
          },
          body: JSON.stringify({
            "ContactKey": Data.EmailAddress,
            "EventDefinitionKey": Data.EventDefinitionKey,
       Data:{stingForJson}
          }),
  </code></pre>