Skip to content

Instantly share code, notes, and snippets.

@Jamie452
Last active November 1, 2016 01:00
Show Gist options
  • Save Jamie452/92451e38686e126bd2be24110a8c8b67 to your computer and use it in GitHub Desktop.
Save Jamie452/92451e38686e126bd2be24110a8c8b67 to your computer and use it in GitHub Desktop.
// Sample data from a console.log
// _id and company are proper ObjectIds
// created_date is a proper Date type
// location.coordinates are valid lng, lat values (changed here to 123, -123)
// I've tested the geoNear functionality and it's working properly (confirmed correct distances too)
[
{
_id: 581678137e2cc93a52f482b0,
title: 'Frontend Developer at Defense Limited',
job_type: 'contract',
salary: 475,
description: 'A long ass description of the job would go here.',
company: 581678137e2cc93a52f482ae,
location: { type: 'Point', coordinates: [123, -123] },
created_date: 2016-10-30T22:45:39.429Z
},
{
_id: 5816447d0f4c1f290a92e458,
title: 'Full Stack Developer at Jamie\'s Aerodynamics',
job_type: 'full-time',
salary: 65000,
description: 'A long ass description of the job would go here.',
company: 5816447d0f4c1f290a92e456,
location: { type: 'Point', coordinates: [123, -123] },
created_date: 2016-10-30T19:05:33.803Z,
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment