diff --git a/src/Response.php b/src/Response.php index 3c7b96f..fda8429 100644 --- a/src/Response.php +++ b/src/Response.php @@ -256,10 +256,11 @@ protected function formatDataFields(array $responseData, array $dataFieldsConfig $alias = $fieldConfig['alias'] ?? $field; $show = $fieldConfig['show'] ?? true; + $map = $fieldConfig['map'] ?? null; unset($responseData[$field]); if ($show) { - $responseData[$alias] = $value; + $responseData[$alias] = $map[$value] ?? $value; } }