Added method to extract dependency from dependencies array