title: Postgresql insert into name and value using a variable
body: <p>I have 2 variables</p>
  
  <pre><code>var anycolumn = 'fruit';
  var anyvalue = 'apple';
  </code></pre>
  
  <p>I was able to insert the value using variable 'anyvalue' like...</p>
  
  <pre><code>"INSERT INTO mytable (fruit) VALUES ($1)", [anyvalue], function(err, result){}
  </code></pre>
  
  <p>Now how do I insert the column name using variable 'anycolumn'?</p>
  
  <p>I'm using node server</p>
  
  <pre><code>"INSERT INTO mytable (anycolumn) VALUES ($1)", [anyvalue], function(err, result){}
  </code></pre>