diff --git a/src/typeform/Typeform.php b/src/typeform/Typeform.php index bd5bf82..871a3c5 100644 --- a/src/typeform/Typeform.php +++ b/src/typeform/Typeform.php @@ -541,6 +541,7 @@ protected function getRows() $rows = []; foreach ($this->getResponses() as $response) { + $hash = ''; $fields = []; foreach ($this->getQuestions() as $question_id => $question_name) { $rr = ''; @@ -548,12 +549,18 @@ protected function getRows() $rr = $response['answers'][$question_id]; } elseif (isset($response['hidden'][$question_name])) { $rr = $response['hidden'][$question_name]; + if ($question_name == 'hash') { + $hash = $rr; + } + } $fields[] = $rr; } $fields[] = isset($response['answers']['score']) ? $response['answers']['score'] : 0; - $rows[] = array_map('utf8_decode', $fields); + $fields[] = $hash; + //$rows[] = array_map('utf8_decode', $fields); + $rows[] = $fields; } return $rows;