top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Insert JSON with different format in mongodb ?

+1 vote
430 views

I use nodejs with mongoDB and I want to insert JSON data into mongo, I use mongoose but I don't wanna to use model and shéma just push different json with different shéma.

Can someone tell me how I can do it ?

posted Jun 25, 2015 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
0 votes

Please advise if a NodeJS app should keep its historical data in a separate MongoDB databases instead of keeping them together with the application data?
For instance, 'transactions' collection and 'transactionhistories' collection, will it be better to store in different databases or single database for the same NodeJS app? Thanks!

+1 vote

I am using mongo db version 2.2.3 . I am having the requirement like user gives the input like "(ash|ben) & (Bus|car)" as search keywords. In this the & is for AND condition and | for the OR condition.
Is there any way to make this nested leywords as a mongodb query in node js. Is there any functionality in mongodb to achieve this?. If not how can make this in any other way?

0 votes

As per my understanding MEAN (Mongodb,Express,Angular.js,Node.js) techstack is the recent buzz in the market for building Web Applications.

My confusion is, why only Mongodb suits the best when compared to other NoSql databases like (hbase, cassandra). If Mongodb is best suited, then why?

Also, can we use hive with angular.js and node.js ?. Can someone help me out with your best answers?

0 votes

I have an aggregation query given below which I need to pass in as a json string to java app to execute it. Is it possible to do that -

{$unwind:$results},{$match:{result.studentid:11}}

I tried using BasicDBObject.parse but it is returning me the unwinded or flattened results and the result is not segregating on the basis of match.

Is there any other way to do it.

...