How to push the result into DB?

I need some help with that...I want to store the results of query from Elasticsearch in mongodb. So am I doing write?

var elastic_results = [{'elasticresult'}];
forEach(elastic_results){db.results_collection.insert();}