title: How to import .JSON file into mongoDB database
body: <p>Can we import JSON file to MongoDB database according to the schema, without saving one by one using controller. Is there any way to import at once according to the schema
  for ex -</p>
  <p>JSON FILE -</p>
  <pre><code>    {
  &quot;Campaigns&quot;: {
      &quot;-MWUAaJvqQpKGsB7QfSr&quot;: {
          &quot;id&quot;: &quot;-MWUAaJvqQpKGsB7QfSr&quot;,
          &quot;imageUrl&quot;: &quot;https://img.youtube.com/vi/SxPpleILQ4M/mqdefault.jpg&quot;,
          &quot;link&quot;: &quot;https://youtu.be/SxPpleILQ4M&quot;,
          &quot;ownerId&quot;: &quot;lW4ZfmutPOcNPsq4NSZ02y9NIiZ2&quot;
      },
      &quot;-MWUAtgSfA1JVbIqP77F&quot;: {
          &quot;id&quot;: &quot;-MWr5PhSt9r2gZQQWURm&quot;,
          &quot;imageUrl&quot;: &quot;https://img.youtube.com/vi/_fWQVHjPU_M/mqdefault.jpg&quot;,
          &quot;link&quot;: &quot;https://youtu.be/_fWQVHjPU_M&quot;,
          &quot;ownerId&quot;: &quot;AWgKC9VEyWgGBl9jl3vc0xPiAuR2&quot;,
          &quot;setting&quot;: {
              &quot;bill&quot;: &quot;300&quot;,
              &quot;dateTime&quot;: &quot;2021.03.28 AD at 10:01:34&quot;,
              &quot;expected_time&quot;: &quot;30&quot;,
              &quot;expected_views&quot;: &quot;10&quot;,
              &quot;types&quot;: &quot;views&quot;
          },
          &quot;views&quot;: {
              &quot;1Psi5NpOEFWREWg8QgRbPkOd6Zu2&quot;: true,
              &quot;4LWTfJJoopMyLwkdAikF48HvyOw2&quot;: true,
              &quot;OKuSRp6cvuXdycRf8IqZGmtV3o23&quot;: true,
              &quot;WWDa5D5Nijf4FYnHXFj2YSxTRhz1&quot;: true,
              &quot;XTkOU3xkyocVnZtDW8fqoxmJcSS2&quot;: true
          }
      }
  },
  &quot;Users&quot;: {
      &quot;25hc20XlzThPW0BBYHrNnmN2DZ83&quot;: {
          &quot;coin&quot;: &quot;240&quot;,
          &quot;email&quot;: &quot;maanhaary879@gmail.com&quot;,
          &quot;id&quot;: &quot;25hc20XlzThPW0BBYHrNnmN2DZ83&quot;,
          &quot;image&quot;: &quot;https://lh3.googleusercontent.com/a-/AOh14Gjjh9RC3y_sac8Bo9k7z2TqRRDWiP_cLkYsoixn=s96-c&quot;,
          &quot;referralCode&quot;: &quot;MABM93BC&quot;,
          &quot;userName&quot;: &quot;maan fatteala&quot;,
          &quot;vip&quot;: false
      },
      &quot;26Oddmdf37fPj5oY0zVH1RmQJCh2&quot;: {
          &quot;coin&quot;: &quot;0&quot;,
          &quot;email&quot;: &quot;minolali39@gmail.com&quot;,
          &quot;id&quot;: &quot;26Oddmdf37fPj5oY0zVH1RmQJCh2&quot;,
          &quot;image&quot;: &quot;https://lh3.googleusercontent.com/a/AATXAJwanRJUu3O2SzLVGFuHINrRqaNmwbfY6Qhynb1W=s96-c&quot;,
          &quot;referralCode&quot;: &quot;MIJIQWSC&quot;,
          &quot;userName&quot;: &quot;Mino Lali&quot;,
          &quot;vip&quot;: false
      }
   }
  
  }
  </code></pre>
  <p>is it possible to import json file to mongoDB db according to schema?</p>