javascript - Query to find all users with a particular role in parse api -
i working pars javascript api. trying is, retrieving users of particular role. used code it. var query = (new parse.query(parse.role)); query.equalto("name", "admin"); query.first({ success: function(role) { role.relation('users').query().find({success: function(users) { }}); }}); the problem returns undefined value role . sops @ line role.relation('users').query().find({success: function(users) saying cannot call relation() undefined value of role.