How to query and display the mongo data

Hi,
I am new to Dreamfactory.I have a mongodb database file called ‘share’ in my C:\data\db - path.
I had written the server side script to query the data from the mongodb file.But its not filter the expected result.Here my data…

{
“_id” : ObjectId(“56ceb4cb59572a040d00002a”),
“name” : “ram”,
“contactinfo” : “12345”,
“email” : “ram@test.com
}
{
“_id” : ObjectId(“56ceb50559572a040d00002b”),
“name” : “test01”,
“contactinfo” : “6789”,
“email” : “test@test.com”,
“amount” : NumberInt(200)
}
and here my code…
[GET] mongo._table.{table_name}

var filter_data = {"filter": "name="+"test01"};
var request = platform.api.get("share/tbl_users",filter_data);
throw request

Here ‘share’ is my database name and ‘tbl_users’ is my table name.

Thanks,

see documentation here:
https://wiki.dreamfactory.com/DreamFactory/Tutorials/Connecting_To_NoSQL

https://wiki.dreamfactory.com/DreamFactory/Tutorials#SQL_and_NoSQL_Data

Why don’t you add your Mongo DB as a Service and then you can use the Swagger API Docs to evaluate and troubleshoot your filters…?

1 Like

Please can you explain with working example.Because i am very new here.

the links I provided are working examples. I recommend consulting the documentation and then clarifying any questions you still have.