The object graph to filter.
A value that determines which properties of the original object are kept in the result. A filter can take on one of the following values:
validate()
method, and will be kept only if the validation is successful.For array properties, the filter value can be an object containing a single property named item
. In
this case, the value of the filter's item
property will be used to filter each item in the array, using
the same rules as above.
Arbitrary data that will be passed to validators and callbacks within the filter.
Filters an object graph according to the rules defined in a filter. Returns an object graph with the same structure as the original, minus any properties that were removed by the filter. Note that prototype chains are NOT preserved by this method -- the result will be a simple instance of Object. Cycles and shared object references within the input object will be preserved in the output (presuming that they pass the filter).