diff --git a/app/Services/FlowTester/ResponseValidator.php b/app/Services/FlowTester/ResponseValidator.php index b55cefd9..a2a8ab61 100644 --- a/app/Services/FlowTester/ResponseValidator.php +++ b/app/Services/FlowTester/ResponseValidator.php @@ -82,6 +82,10 @@ private function getValueByPath(array $data, string $path): mixed return $data; } + // JSONPath 배열 인덱스 표기법 [n]을 Laravel dot notation .n으로 변환 + // 예: data.data[0].id → data.data.0.id + $path = preg_replace('/\[(\d+)\]/', '.$1', $path); + return data_get($data, $path); }