src/Csv.php
public function getBy($fieldName, $fieldValue, $fetchFields = []) {
	$result = $this->getAllBy($fieldName, $fieldValue, $fetchFields, 1);
	if(isset($result[0])) {
		return $result[0];
	}
	else {
		return null;
	}
}
public function getBy($fieldName, $fieldValue, $fetchFields = []) {
	$result = $this->getAllBy($fieldName, $fieldValue, $fetchFields, 1);
	if(isset($result[0])) {
		return $result[0];
	}
	else {
		return null;
	}
}
public function getBy ( $ fieldName , $ fieldValue , $ fetchFields = [ ] ) { $ result = $ this -> getAllBy ( $ fieldName , $ fieldValue , $ fetchFields , 1 ) ; if ( isset ( $ result [ 0 ] ) ) { return $ result [ 0 ] ; } else { return null ; } }
Returns the first element in the matching rows, without iterating over the
whole data.

@param string $fieldName Name of field to match on
@param string $fieldValue Value of field to match
@param string $fetchFields NOT IMPLEMENTED List of fields to include

@return array|null Associative array of first matching row, or null if no
match found
Returns the first element in the matching rows without iterating over the whole data .