title: How can I import data to Mongodb from Json file using java
body: <p>I am struggling with importing data into <code>Mongodb</code> from a <code>Json</code> file.<br>
  I can do the same in command line by using <code>mongoimport command</code>.<br>
  I explored and tried lot but not able to import from Json file using java.</p>
  
  <p><strong>sample.json</strong></p>
  
  <pre><code>    { "test_id" : 1245362, "name" : "ganesh", "age" : "28", "Job" : 
         {"company name" : "company1", "designation" : "SSE" } 
      }
  
      { "test_id" : 254152, "name" : "Alex", "age" : "26", "Job" :
         {"company name" : "company2", "designation" : "ML" } 
      }
  </code></pre>
  
  <p>Thank for your time.
  ~Ganesh~</p>