diff --git a/_includes/js/queries.md b/_includes/js/queries.md index 1ddbf73f0..afc29383c 100644 --- a/_includes/js/queries.md +++ b/_includes/js/queries.md @@ -57,7 +57,7 @@ You can skip the first results by setting `skip`. In the old Parse hosted backen query.skip(10); // skip the first 10 results ``` -If you want to know the total number of rows in a table satisfying your query, for e.g. pagination purposes - you can use `withCount`. +If you want to know the total number of rows in a table satisfying your query, for e.g. pagination purposes - you can use `withCount`. **Note:** Enabling this flag will change the structure of response, see the example below. @@ -176,6 +176,18 @@ query.find().then(function(results) { }); ``` +Similarly, use `exclude` to remove undesired fields while retrieving the rest: + +```javascript +var GameScore = Parse.Object.extend("GameScore"); +var query = new Parse.Query(GameScore); +query.exclude("playerName"); +query.find().then(function(results) { + // Now each result will have all fields except `playerName` +}); +``` + + The remaining fields can be fetched later by calling `fetch` on the returned objects: ```javascript