title: Tedious node.js SQL connection; want to insert multiple values from an array
body: <p>I'm running a loop and trying to insert the multiple values from an array while running it. </p>
  
  <p>Here is the code: </p>
  
  <pre><code>function GetJobsToCourseID(index, jobData){
    if((jobData != undefined)||(jobData != null)){
  
  
      var extrArray = [];
  
      for(var i = 0 ; i&lt; jobData.length; i++){
          extrArray = jobData[i];
  
      for (var j=0; j&lt;extrArray.length; j++)
      {
        console.log(extrArray[j]);
          requestID = new Request("SELECT IDKey from dbo.Jobz where SubJobFamily ='"+extrArray[j]+"'",  function(err, rowCount){
  
          if (err) {
                   console.log(err);
                   }
           else {  connection111.reset(function(err){});
                           }
  
  
      });
        }
      }
    }
  
      requestID.on('row', function(columns) {
      for (var i = 0; i &lt;columns.length;  i++)
  
      {  
  
        console.log(columns[i].value, "Please work");
  
  
        if (columns[i].value == null || columns[i].value == undefined) {
          console.log('NULL');
        } else {
  
  
  
        }
  
  
    }
  
      connection111.execSql(requestID);
  
      });
   }
  </code></pre>
  
  <p>As you can see I'm trying to insert the j element of my tempArray(I dont think it should work anyways, because of how Tedious connections work)</p>
  
  <p>What would be the approach then - extracting each array element and populating it withing the SQL table using Tedious? </p>