Get Free Trial
API reference
Table of contents

getMembersAsync

[starting from version: 2.9]

getMembersAsync(uniqueName: String, memberName: String): Promise<Object[]>

Returns a Promise object that resolves to an array of members for the specified hierarchy. Learn more about the array’s structure and method’s parameters in getMembers.

Example

flexmonster.getMembersAsync("Category").then(members => {
  members.forEach(
    item => console.log(item);
  );
}); 

/* getMembersAsync method returns array of objects 
[  
  {
    "uniqueName": "category.[accessories]",
    "caption": "Accessories",
    "parentMember": "category.[(all member)]",
    "isLeaf": true,
    "children": []
  },
  {
    "uniqueName": "category.[bikes]",
    "caption": "Bikes",
    "parentMember": "category.[(all member)]",
    "isLeaf": true,
    "children": []
  },
  ... 
]
*/

See an example on JSFiddle.

See also

getMembers