Add method to extract first object passing test from array