Blog Archives

Return the response from ajax call ?

Tweet Return the response from ajax call ? : The A in AJAX stands for asynchronous. That means sending the request (or rather receiving the response) is taken out of the normal execution flow. Synchronous : Imagine you make a

Posted in Snippets

Convert String into MongoDB BsonDocument

Tweet If you have a long string in JSON format, and you want to convert it into a BSONDocument for insertion into a MongoDB database.You can simply do it by defining the query as string json = "{ 'foo' :

Posted in MongoDB, Snippets

Access variable property by Name as String ?

Tweet If i have a javascript object that looks like below var employee = { job: programmer, address : India, status : single } and i have a function that is passed both the object, and a property name like

Posted in Snippets Tagged with: ,