Handle both array and single hash results