title: How to save [object Object] in mysql table
body: <p>I am reading a JSON file and I extract info from it. Here is an example:</p>
  
  <pre><code> "mediaFiles": [{
    "mediaUri": "some.mp3",
    "mediaPath": "something.mp3",
    "startTime": "2018-05-09T03:04:22.000 0000",
    "stopTime": "2018-05-09T03:04:31.000 0000",
    "callUUID": "something",
    "mediaId": "something.mp3.bin",
    "type": "audio/mp3",
    "duration": "9255",
    "tenant": "Environment",
    "ivrprofile": "Record",
    "size": "18144",
    "parameters": {
      "dateTime": "2018-05-09T03:04:47Z",
      "uniqueId": "J2KV33MUT53JTBG0U73CDKC7QS000006",
      "from": "1002",
      "id": "J2KV33MUT53JTBG0U73CDKC7QS000006_2018-05-09_03-04-47_",
      "to": "1001",
      "usered": "Agent2N@somewhere.com"
    },
    "pkcs7": ".. values ...",
    "certAlias": [" ... values....],
    "partitions": [],
    "accessgroups": ["/myagents"]
  }],
  </code></pre>
  
  <p>Everything is fine until I reach the <strong>Parameters</strong> object. I have another process which happily extracts them but I can't find a way to exclude them in the <code>mediafiles</code> array. Here is a snippet of how I do it:</p>
  
  <pre><code>      for (num in J.recordings[x].mediaFiles) {
        mediavalue += Object.values(J.recordings[x].mediaFiles[num]) + 
   "),";
        mediavalue.replace(",[object Object],", ",");
        for (numpara in J.recordings[x].mediaFiles[num].parameters) {
      paradata += "'" + J.recordings[x].mediaFiles[num].parameters[numpara] + "',";
  
    }
    paradata = paradata.slice(0, -1);
    paradata += temppara;
    savepara(paradata);
  }
  
  
  mediadata += mediavalue;
  //   mediadata.slice(12);
  // tried to exclude parameters... didnt work
  savemedia(mediadata);
  </code></pre>
  
  <p>I need to get all the values in the mediaFiles kvp and put them into an insert statement to save to MySQL. However, the parameters appear as <code>[object Object]</code>. I tried excluding them, replacing them and now I'm trying to save them as a blob.</p>