Complete the code to convert the field 'age' to an integer using $toInt.
{ $project: { ageInt: { [1]: "$age" } } }The $toInt operator converts a value to an integer type.
Complete the code to convert the field 'score' to a string using $toString.
{ $project: { scoreStr: { [1]: "$score" } } }The $toString operator converts a value to a string type.
Fix the error in the code to convert 'price' to integer using $toInt.
{ $project: { priceInt: { [1]: "price" } } }The field name must be prefixed with '$' to refer to the field value. The operator $toInt is correct for integer conversion.
Fill both blanks to convert 'quantity' to integer and 'description' to string.
{ $project: { qtyInt: { [1]: "$quantity" }, descStr: { [2]: "$description" } } }$toInt converts 'quantity' to integer, and $toString converts 'description' to string.
Fill all three blanks to convert 'height' to integer, 'weight' to string, and 'active' to boolean.
{ $project: { heightInt: { [1]: "$height" }, weightStr: { [2]: "$weight" }, isActive: { [3]: "$active" } } }$toInt converts 'height' to integer, $toString converts 'weight' to string, and $toBool converts 'active' to boolean.