title: Choose selected fields of query by input using mgo
body: <p>Is it possible to have a method that takes as input an array of strings and then use this array to create the selected fields of a query?
  So if you have lets say this array: </p>
  
  <pre><code>var myArray []string{"fieldA","fieldB"}
  </code></pre>
  
  <p>Then you can create this automatically:</p>
  
  <pre><code>selectedFields := bson.M{"fieldA": 1, "fieldB": 1}
  </code></pre>
  
  <p>and then execute the query</p>
  
  <pre><code>result = c.Find(query).Select(selectedFields).One()
  </code></pre>