nested_filter v1.2.1 NestedFilter

Documentation for NestedFilter.

Summary

Functions

Take a (nested) map and filter out any values with specified keys in the keys_to_reject list

Take a (nested) map and filter out any keys with specified values in the values_to_reject list

Take a (nested) map and keep any values with specified keys in the keys_to_select list

Types

key()
key() :: any
keys_to_select()
keys_to_select() :: list
predicate()
predicate() :: (key, val -> boolean)
val()
val() :: any

Functions

drop_by(struct, predicate)
drop_by(list, predicate) :: list
drop_by(map, predicate) :: map
drop_by(struct, predicate) :: struct
drop_by_key(map, keys_to_reject)
drop_by_key(%{optional(any) => any}, [any]) :: %{optional(any) => any}

Take a (nested) map and filter out any values with specified keys in the keys_to_reject list.

drop_by_value(map, values_to_reject)
drop_by_value(%{optional(any) => any}, [any]) :: %{optional(any) => any}

Take a (nested) map and filter out any keys with specified values in the values_to_reject list.

take_by(map, keys_to_select)
take_by(map, keys_to_select) :: map
take_by_key(map, keys_to_select)
take_by_key(%{optional(any) => any}, [any]) :: %{optional(any) => any}

Take a (nested) map and keep any values with specified keys in the keys_to_select list.