Get Free Trial
API reference
Table of contents

getFilter

getFilter(hierarchyName: String): FilterObject

[starting from version: 1.4]

Returns the FilterObject for the specified hierarchy.

Parameters

  • hierarchyName – String. The name of the hierarchy.

Returns

FilterObject that contains filtering information.

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