This repository was archived by the owner on Dec 12, 2018. It is now read-only.

Description
Code:
account.getGroupMemberships({expand: 'group'}, (err, memberships) => {
memberships.filter((membership, next) => {
console.log('checking if membership should be included', membership.group.name);
const test = membership.group.name.startsWith('myString');
console.log('will be included?', test);
next(null, test);
}, (err, memberships) => {
console.log('got filtered group memberships', err, memberships);
});
});
Output:
checking if membership should be included myString:831f9e62cd
will be included? true
checking if membership should be included myString:831f9e62cd/example:34a800114c
will be included? true
checking if membership should be included stuff:831f9e62cd/example:34a800114c
will be included? false
got filtered group memberships [] undefined
I would expect err to be undefined and memberships to contain the two first memberships. Documentation: https://docs.stormpath.com/nodejs/jsdoc/CollectionResource.html#filter__anchor
Using stormpath 0.18.5 on node 6.9.1.