There are a lot of advantages. Some of most important are:
You can directly map response from MongoDB to JavaScript objects, so you don’t need any mapping layer in the application.
In RDBMS, all rows need to have all columns defined. So if you want to add new column for some row, all other rows would still get that column, even if it’s empty. In MongoDB, you can add new key/value pairs to specific document, without adding it to other documents.
You can have nested properties and arrays in MongoDB document.
In MongoDB, indexes optimize the performance of the queries. So if you create an index for some property in a collection, and if you query the collection based on that property, the response would be much faster.
You can create index for many properties in the same collection independently, or even create compound index for multiple properties.
Usually, you will first check your use case and see on which properties you query the collection the most, and you would want to create indexes on these properties to optimize the performance.