title: How to create a schema to add several array into object Node/mongo db using post
body: <p>this is the schema that I have now but I need to add more array as number 2, 3, 4</p>
  <pre><code>&gt; const PostSchema = mongoose.Schema({
  &gt;     navigation: {
  &gt;         1: [
  &gt;             
  &gt;             subSchema
  &gt;         ]
  &gt;     }  })
  </code></pre>
  <p>example:</p>
  <pre><code>&gt; {
  &gt;     &quot;navigation&quot;: {
  &gt;         &quot;1&quot;: [test]
  &gt;         &quot;2&quot;:[test2] }
  &gt; }
  </code></pre>
  <p>//post api</p>
  <pre><code>const post = new Post({
          navigation: req.body.navigation
      });
      response = {
          message: 'success',
          uuid: req.body.uuid
      }
      try {
          const savedPost = await post.save()
  </code></pre>