# Function filter

- filter<T>(obj, callback): Partial<T>

- Similar to Array.filter, except that it filters an object's own enumerable properties.

  #### Type Parameters

  - T extends Record<string, unknown>

  #### Parameters

  - obj: T

    The object to filter.

  - callback: ((value: T[keyof T], key: keyof T, obj: T) => boolean)

    The callback to invoke for each property. The callback's return value will determine whether the property is kept in the result.

    - - (value, key, obj): boolean

      - #### Parameters

        - value: T[keyof T]
        - key: keyof T
        - obj: T

        #### Returns boolean

  #### Returns Partial<T>

  An object containing the properties for which the callback function returned a value that evaluates to `true`.