How to delete objects matching a query

Is there a way to delete all the objects that match a query. E.g. If I want to delete all the profiles (all the rows in the class Profile) that are created by a user.

The easiest way would be something like this:

await Parse.Object.destroyAll(await new Parse.Query('Profile').find({ useMasterKey: true }), { useMasterKey: true });
1 Like