MongoDB Exercises, Practice, Solution: Write a MongoDB query to display the fields restaurant_id, name, borough and cuisine, but exclude the field _id for all the documents in the collection restaurant.
We have access to the data object in the configuration before it reaches the component. This cleans up the code in the component but can add some visual complexity in theapi.jsfile. The choice is up to the developer where—or if—to format the response data. Regardless, let’s see where...