Web Scrapers Generator BrowserExt

filter_key

Filters the keys of an array or a dictionary in accordance with the regular expression.

filter_key(data, type, str)
    

Parameters:

data An array or a dictionary, which is filtered.
type Filter type. Can be 'regexp' - matches the regular expression, and 'notregexp' - does not match the regular expression.
str Regular expression pattern.

The return value is an array or dictionary with only those elements of the data, the keys of which correspond to the condition.

Example 1.