Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// User's location
const userLocation = myUser.get("location");
// Create a query for Restaurants
const query = new Parse.Query("Restaurant");
// Interested in locations near the User
query.near("location", userLocation);
// Limit the result set to 10 objects
// Final list of 10 Restaurants nearest to the User, ordered by Distance ascending
const nearRestaurants = await query.find();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment