FindOne()
map[
_id:ObjectID("12")
chatID:12
expenses:[
map[amount:12 category:food]
map[ amount:14 category:food]]
income:[]]
{"_id":{"$oid":"12"},
"chatID":{"$numberInt":"12"},
"expenses":[
{"category":"food","amount":{"$numberDouble":"12.0"}},
{"category":"food","amount":{"$numberDouble":"14.0"}}],
"income":[]}
type Expense struct {
Category string `bson:"category"`
Amount float `bson:""amount"`
}
type MyDoc struct {
ID primitive.ObjectID `bson:"_id, omitempty"`
ChatID int `bson:"chatID"`
Expenses []Expense `bson:"expense"`
Income []int(тип какой хотите) `bson:"income"`
myDoc = MyDoc{}
err = mongo.FindOne(context.TODO(), {}).Decode(&myDoc)
}