I am using mongodb 2.4.4 and I want to compare 2 documents and then print their differences only using mongo shell. Is there any way to compare them? Sort of:
db.collection.compare({first_doc: objectID("blablalba"), sec_doc: objectID("blalba2")})
and the output will be something like
{diff1:{latitude:{first_doc:10.000, sec_doc:20.000}},diff2:{}}
where latitude is the name of a field that has a difference.
The output does not have to be the same, but gives the same functionality. Thanks
source share