diff --git a/src/Value/Resolver.php b/src/Value/Resolver.php index ace5791f..c2bf4453 100644 --- a/src/Value/Resolver.php +++ b/src/Value/Resolver.php @@ -55,8 +55,11 @@ public function get($resource, $attribute, $layouts) protected function extractValueFromResource($resource, $attribute) { $value = data_get($resource, str_replace('->', '.', $attribute)) ?? []; + if (is_string($value)) $value = json_decode($value) ?? []; - if (!is_array($value)) return []; // Fail silently in case data is invalid + + // Fail silently in case data is invalid + if (!is_array($value)) return []; return array_map(function($item) { return is_array($item) ? (object) $item : $item;