0

With MongoDB I can do the following:

db.collection.find({}, {"select_just_this_field": 1})

But how I can do the same with MongoDB + BSON (GoLang) - Something like:

bson.M{{}, {"select_just_this_field": 1}}
icza
  • 389,944
  • 63
  • 907
  • 827
Niklas
  • 49
  • 4
  • What driver are you using? What have you tried? Please include your attempt and the problems you're facing. – icza Dec 19 '20 at 18:50
  • I´m using go.mongodb.org/mongo-driver/mongo I want to just select specific fields from Mongo and append the results to a existing struct – Niklas Dec 19 '20 at 19:23

0 Answers0