nested filter to array