//
//  Survival Advice:  Organize before they rise !
//

var person = db.people.findOne( { name: "Sean" } );

print('\nThe following people are near ', person.name,'\n');

db.people.find( { location: { $near: person.location } } ).forEach(function(closebyperson) {

  print( closebyperson.name, closebyperson.location, closebyperson.weapon.name );

  });

var radius = 20;

print('\nThe following people are in a ', radius, ' meters radius from ', person.name,'\n');

db.people.find( { location: { $near: person.location, $maxDistance: radius } } ).forEach(function(closebyperson) {

  print( closebyperson.name, closebyperson.location, closebyperson.weapon.name );

  });


@@ -329,32 +329,63 @@
 rson.weapon.name
+, closebyperson.weapon.strength
  );%0A%0A  %7D);%0A%0Avar 
@@ -686,16 +686,47 @@
 pon.name
+, closebyperson.weapon.strength
  );%0A%0A  %7D

Print weapon details