Need a special offer?Find out if your project fits.
+
All documentation
API reference
  • API Reference for older versions
  • getFilter

    getFilter(uniqueName: String): FilterObject

    [starting from version: 1.4]

    Returns the FilterObject for the specified field.

    Parameters

    Parameter/Type Description
    uniqueName
    String
    The field's unique name.

    Returns

    FilterObject that contains filtering information.

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

    Example

    flexmonster.setFilter("Country", 
      {
        "members": [
          "country.[poland]",
          "country.[uk]",
          "country.[ukraine]",
        ]
      }
    );
    flexmonster.getFilter("Country");
    
    /*
    method getFilter() returns the following object:
    {
      "members": [
        "country.[poland]",
        "country.[uk]",
        "country.[ukraine]",
      ]
    }
    */

    Try the example on JSFiddle.

    See also

    clearFilter
    setFilter