Foods that contain all essential amino acids are called “complete” proteins. Only animal proteins are complete proteins (including egg and milk) but plant foods can be combined to make complete proteins.
For this reason, when you hear that peas have 8 grams of protein in a cup, it is not safe to assume that it contributes the same amount and quality of protein as a cup of Greek Yogurt, for example, just because it lists about the same amount of protein on the package. Green peas are missing some essential amino acids that are found in Greek yogurt.