title: Meteor Import JSON into Collection
body: <p>I am trying to import a JSON file that has embedded objects into the MongoDB and would like to know how to format to import the doc correctly. To be clear the doc format must remain in its current form. I must modify/create a function or method that would allow this file to be imported with _id associated in the sport-events array loop (Ive shorted to one sports-event array for brevity). Perhaps a better way of putting the question is how could I import eveything in the sports-event array and leave the rest of the doc.</p>
  
  <p>JSON Doc.</p>
  
  <pre><code>{
  "sports-content": {
      "sport-event": [{
          "event-metadata": {
              "league": "NCAA Basketball",
              "event-type": "0",
              "league-details": "NCAAB",
              "event-date-time": "12/18/2015 07:00 PM",
              "eventNum": "3000460",
              "status": "",
              "off-the-board": "False"
          },
          "team": [{
              "team-metadata": {
                  "alignment": "Home",
                  "nss": "526",
                  "openNum": "526",
                  "name": {
                      "full": "Clemson"
                  }
              },
              "wagering-stats": {
                  "wagering-straight-spread": {
                      "bookmaker-name": "BetOnline",
                      "active": "true",
                      "line": "1.5",
                      "money": "-110",
                      "context": "current"
                  }
              },
              "team-stats": {
                  "score": "0"
              }
          }, {
              "team-metadata": {
                  "alignment": "Away",
                  "openNum": "525",
                  "nss": "525",
                  "name": {
                      "full": "South Carolina"
                  }
              },
              "wagering-stats": {
                  "wagering-straight-spread": {
                      "bookmaker-name": "BetOnline",
                      "active": "true",
                      "line": "-1.5",
                      "money": "-110",
                      "context": "current"
                  }
              },
              "team-stats": {
                  "score": "0"
              }
          }]
      }],
      "sports-meta-data": {
          "doc-time": "42353.5979256944"
      }
    }
   }
  </code></pre>
  
  <p>Meteor server.js under Meteor.startup</p>
  
  <pre><code>if (SportEventsFeed.find().count() === 0) {
      console.log("Importing private/products.json to db")
  
      var data = JSON.parse(Assets.getText("ncaab.json"));
  
      data.forEach(function (item, index, array) {
          SportEventsFeed.insert(item);
      })
  }
  </code></pre>