Original post

Hi Folks, I’m stumped – the documentation is too dense, and my eyes are burning. Could anyone help me build the necessary query for finding all documents in mongodb that have the parent UUID i’m supplying?

 

Something along the lines of:

db.bits.find({"parents": {$in: [new BinData(0,"spDTtvExQK29P4V+btl5Sg==")]}})

 

The structure is really straight forward:

type bit struct {
    ...
    Parents     []uuid.UUID       `bson:"parents"`
    ...
}

I need to find all of those elements in mongoDB that are parents of the UUID I supply.

 

Thanks in advance