jQuery.when()

Provides a way to execute callback functions based on zero or more Thenable objects, usually Deferred objects that represent asynchronous events.

jQuery.grep()

Finds the elements of an array which satisfy a filter function. The original array is not affected.