title: JSON.stringify(array) surrounded with square brackets
body: <p>I'm trying to get an array of data to insert into multiple columns in an sqlite database, I'v got it almost working with this:</p>
  
  <pre><code>function InsertData(dbData){
    var valueArray = [], dataArray = [];
    var values = Object.keys(dbData);
    for(var key in values){
      valueArray[valueArray.length] = values[key];
      dataArray[dataArray.length] = dbData[values[key]];
    }
    console.log("INSERT INTO "+dbData.table+" ("+valueArray+") VALUES ("+JSON.stringify(dataArray)+")");
    dbData.database.serialize(function(){
      dbData.database.run("INSERT INTO "+dbData.table+" ("+valueArray+") VALUES ("+JSON.stringify(dataArray)+")");
    });
  }
  </code></pre>
  
  <p>My data is constructed as so:</p>
  
  <pre><code>//app.js
  function EventData(title, value, other){
    this.title = title;
    this.value = value;
    this.other = other;
  }
  EventData.prototype = new dbtools.DBData(usuevents, 'event');
  var thisEventData = new EventData('newData', 4, 2);
  
  //dbtools.js
  DBData = function(database, table){
    this.database = database;
    this.table = table;
  };
  </code></pre>
  
  <p>the console.log outputs <strong>INSERT INTO event (title,value,other) VALUES (["newData",4,2])</strong>
  I just need the [] square brackets removed on <strong>(["newData",4,2])</strong>.
  How would I do this? Also if there is a better way to insert data into sqlite im open to suggestions. Thanks</p>