iam pasting a sample json data
'{
"_id" : "bmZ4zj4LsQTfQuNuK",
"createdAt" : ISODate("2015-08-11T08:14:23.579Z"),
"services" : {
"google" : {
"accessToken" : "ya29.zgEaK4__zUZ_cyIbFePUG_haH0Q6OAIiw-rMAD3dSoW2R7Hhf4NKaYiv8yao8PslqVHB_A",
"idToken" : "eyJhbGciOiJSUzI1NiIsImtpZCI6Ijc3N2YyYjI0MmRiZjQxY2Y1YThlZTcwODQ1YjYwNDZjMTA4Njk2NTEifQ.eyJpc3MiOiJhY2NvdW50cy5nb29nbGUuY29tIiwiYXRfaGFzaCI6Il9sa0M0NWVRa1JCYmE5aVl0VXFvMUEiLCJhdWQiOiI1ODA0MTA1MzA1OTUtN2I0Y3VlbXBqNXAzb3Z0NGhwdjUxN2x2MWRuYTNxNGguYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJzdWIiOiIxMDc3NDYwOTY0OTQwNTAwNDgzMTUiLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiYXpwIjoiNTgwNDEwNTMwNTk1LTdiNGN1ZW1wajVwM292dDRocHY1MTdsdjFkbmEzcTRoLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwiZW1haWwiOiJiaGF2bmFqZDkxQGdtYWlsLmNvbSIsImlhdCI6MTQzOTQ0NTEyOSwiZXhwIjoxNDM5NDQ4NzI5fQ.er9uigCmyu7fK7twlO7nOzyFxSQh_xffNJ1nJx97IPYXfU5LigSQKlettRLp-Q_IaSS-AVe5itTjnrzMR6_iTy-qyEuYLnSWbTSK5sdn2npqaZ1WuDhZcjvKL-Im1Uq2OO78_9Ocmr0xJGdBpPnqtZWVL5MXKoNt48PV1DZM8TxMSCdaR-m7pgldGb9jdM0McXPIRtIIXSCxLOJxTWwVqDk69D5nxtWTgTDSOOOTG6jqjLYavMVKpQgxe4RslGiepkhyivn79e7Cj1zoYYdJs3RheDXhfo5M7kQwlKMipgOdtis-lnwgixJGlTGSY6kGFPMxEPLIxevOn10mepoYwQ",
"expiresAt" : 1439448729870.0000000000000000,
"id" : "107746096494050048315",
"email" : "bemail@gmail.com",
"verified_email" : true,
"name" : "Bhavna Jd",
"given_name" : "Bhavna",
"family_name" : "Jd",
"picture" : "https://lh4.googleusercontent.com/-XTrSHjAevaQ/AAAAAAAAAAI/AAAAAAAACmE/2SjCQG4sfUg/photo.jpg",
"locale" : "en",
"gender" : "female"
},
"resume" : {
"loginTokens" : [
{
"when" : ISODate("2015-08-13T05:52:10.057Z"),
"hashedToken" : "6HMkKAAJ41IODjdvjWqHIrbBd4tH6JSElW2YqlYwWAQ="
}
]
}
},
"profile" : {
"name" : "Bhavna d",
"location" : {
"lat" : 19.2158777000000001,
"lng" : 73.0957705999999945
},
"image" : "/cfs/files/images/6QEotuGhSWob28sBq"
},
"registered_emails" : [
{
"address" : "email@gmail.com",
"verified" : true
}
],
"status" : {
"online" : true,
"lastLogin" : {
"date" : ISODate("2015-08-13T05:52:10.175Z"),
"ipAddr" : "127.0.0.1",
"userAgent" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.130 Safari/537.36"
},
"idle" : false
}
}
i want to search based on nearest to him iam storing lat and long
"location" : {
“lat” : 19.2158777000000001,
“lng” : 73.0957705999999945
},’
i know $near command
but how can i use it any xample pls