Get Free Trial
API reference
Table of contents

getFilter

getFilter(uniqueName: String): FilterObject

[starting from version: 1.4]

Returns the FilterObject for the specified hierarchy.

Parameters

  • uniqueName – String. The hierarchy’s unique name.

Returns

FilterObject that contains filtering information.

Note The FilterObject is null if the hierarchy contains one member and only the filter.members, filter.exclude, or filter.include filter is defined.

Example

flexmonster.setFilter("Category", 
  {
    "members": [
      "category.[bikes]",
      "category.[cars]"
    ]
  }
);
flexmonster.getFilter('Category');

/*
method getFilter() returns the following object:
{
  "members": [
    "category.[bikes]",
    "category.[cars]"
  ]
}
*/

Try the example on JSFiddle.

See also

clearFilter
setFilter