Getting problem to load validate lab1

i cant execute lab questions because of validate lab1.js . I dont know how to load in CMD

What issue are you facing? Show us a snapshot
cd to the directory where this file is residing
Connect to your mongod
Then run
Search our forum threads for more examples

Like Ramachandra said you need to

  1. load the validateLab.js into your mongodb shell (i use mongosh)
  2. then create a pipeline variable and assign your aggregation pipeline to it.
  3. now run the validate function with your pipeline variable as a parameter. validate(pipe_line_variable)

im going off memory but should be something like that if not exactly that

1 Like