
Postgres, people. No need for cosmosdb.
If you use its amazing JSONB data type, you get something very MongoDB-like alongside relational just out of the box. And amusingly when they launched it it was faster than MongoDB at the only thing MongoDB does, while still also being a fully fledged relational database.
MongoDB then rewrote their engine to make it faster than this little corner of Postgres, so that's good.