The next stage we'll learn about is Project. Project, like the match, is a vital stage to thoroughly understand to be successful with the aggregation framework. Please don't think a Project like the projection functionality available with the fine query operator. While it is true, Project is much much more. Not only can we selectively remove and retain fields, we can reassign existing field values and derive entirely new fields. A common method or function available in many programming languages is map. It is a higher order function that apply some transformation among a collection. If match is like a filter method, Project this like map. Here is a basic syntax for Project. We propend a dollar sign to signify that it is an aggregation operator. Then open up with a curly brace enclosed with the curly brace,. Between these two braces is where we use aggregation expressions and perform for your logic. More on that soon. Here is how we'd specify values to remove and retain. Just like the Projection functionality of Elbo with the fine query operator. This specifies that we wish to remove the underscore ID and retain the name field. Notice that since we specified a value to retain, we must specify each value we wish to retain. Let's also keep the gravity field so we can see some difference in real data, and of course an exception. Here we going to say we're getting the name and the gravity field, but we're also getting the underscore ID field. The underscore ID field is the only field that must explicitly remove, all others will be removed when we specify at least one field to retain. Also it looks like whoever put this data together used the international system of units. So let's also just get the value. And the error. One thing to keep mind, once we start diving into documents, selecting on subfields, we must surround our arguments with quotes. There the data we wanted. Project is already showing to be pretty useful, but so far it appears to be identical to Projection available with the fine query operator. Let's start exploring what makes Projects so powerful. Instead of returning a document with just the value field, let's directly assign the value to the gravity field. Here we can see that we are indeed reassigning the gravity field to now contain the information that was available at Gravity dot value. We're propending gravity dot value with a dollar sign. This is one of the many aggregation expressions and we're directing the aggregation framework to look for and fetch the information in the document at Gravity dot value, or a field path expression. As discussed in the aggregation structure and syntax lesson, this is one of the ways we reference documents for information. We can also create a new field called surface gravity. This isn't just renaming the gravity field, it's creating an entirely new field, very powerful and we'll be using this functionality a lot through the course. Let's have a bit of fun and use the arrogation framework to calculate a value. I'd like to see what my weight would be on each main body in the solar system. I'm going to have to use an expression to accomplish this, we'll cover expressions in much greater detail shortly, but I'm going to break this down since it's our first time seeing it and the Syntax can catch people off guard. I weigh about 86 kilograms, looking at our previous results, it looks like if I divide the gravity of a body by the gravity of Earth and then multiply that value by my weight, I can find out how much I'd way on every main body. I'm going to have to use an expression to accomplish this. The first expression I'm going to use is the multiply arithmetic expression. Multiply takes an array of values and multiplies them together. So, I know I need to multiply my weight, times the ratio of a specific planet's gravity divided by the Earth's gravity. That would look something like this. I know my weight is about 86 kilograms, so I can just hard code that for now. To calculate the gravity ratio I'll need to use the divide arithmetic expression. Divide, takes an array of two values and divides the first by the second. Within divide, I'll need to reference the information at the values subfield within gravity. Let's see what this would look like. Here, we're using a path expression to refer to information within the document, specifically the information found at the value field within the gravity field. I know the gravity of Earth is around nine point eight meters per second per second. So I'll just hard code that in. So putting it all together, we have the following. All of this is assigned to a new field we create called Myweight. Awesome we can see I'd way about thirty two point five kilograms on Mars and two thousand four hundred and four kilograms on the sun. We're beginning to see the power of Project. Project is a powerful stage of the aggregation framework. Not only can we remove and retain fields, we can derive new fields and reassign existing fields. Project may be used as many times as desired within an aggregation pipeline, and it should be used aggressively to trim data out of documents that isn't required in order to keep our pipelines performant. Some key things to remember, once we specify one field to retain, we must specify all fields we want to retain. The underscore ID field is the only exception to this. Beyond simply removing and retaining fields, Project lets us add new fields. Project can be used as many times as required with an aggregation pipeline. And finally, Project can be used to reassign values to existing field names and to derive entirely new fields.