Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

173
Views
How to post array of Subdocument, and check with Postman?

On the server side I have a model and a controller to execute the POST action. However it is giving results of 404.

model would contain array of subdocuments. for example **

[AnswerSchema]
{answer: String,
 index: Number}
[QuestionsSchema]
{question: String,
 answers: [AnswerSchema],...}
[QuizSchema]
{questions:  [QuestionSchema],...}

**

in the controller side it would with an aysnc function

**

const newQuiz = new Quiz({
            questions: req.body.questions
});
        
const savedQuiz = await newQuiz.save();

**

but while using Postman it wouldn't execute the post and give a 404 page. do I need to have any "push" for the questions in the controller side? or is there a hight possibility that there is something wrong with the data tested in postman?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!