M320 lab 2.2 (two correct answers, marked wrong)

So, I misunderstood the question at first and got two wrong marks. This is totally on me for not reading the entire lab before I answered.

However, I noticed that after reading the question the answer I picked and the answer that is “correct” only have one difference that shouldn’t differentiate the structure from being correct or incorrect.

Spoiler warning: answer

The only difference between the answer I picked and the “correct” answer was the choice of using a custom _id value instead of populating employee_id. Considering the assumption in the data structure that an employee_id is unique then it could be used in the _id field without any drawbacks. This was explained in detail in m001. It’s also fairly common practice from what I’ve seen to override the _id field when you know a value will be unique. I don’t understand how this is the wrong answer at all, when both data structures accomplish the same thing.

1 Like

So, looking back I see what I was missing, the KVP types are explicitly stated, and the type of the _id field was wrong.

I agree with you on that. Strange unique correct answer indeed