title: Dynamic BSON creation in Golang MongoDb driver
body: <p>I am using following BSON for a filter query. </p>
  
  <pre><code>id1, _ := primitive.ObjectIDFromHex("5da34e9037c3bed2f5409489")
  id2, _ := primitive.ObjectIDFromHex("5da3511c37c3bed2f540948a")
  
  filter := bson.D{{"_id", bson.D{{"$in", bson.A{id1, id2}}}}}
  </code></pre>
  
  <p>We have only id1 and id2 for now, but in future there will be id3 , id4.</p>
  
  <p>How to create dynamic BSON and pass it in filter?</p>