{{--
{{ $option }}
@endforeach @else{{ is_array($decodedAnswers) ? implode(', ', $decodedAnswers) : $decodedAnswers }}
@endif{{ print_r($questions) }}
{{ print_r($responses) }}@foreach ($responses as $response) @php $question = $questions[$response->question_id] ?? null; $decodedAnswers = json_decode($response->answers, true); @endphp @if ($question)
{{ $option }}
@endforeach @endif @else{{ is_array($decodedAnswers) ? implode(', ', $decodedAnswers) : $decodedAnswers }}
@endifQuestion not found for ID: {{ $response->question_id }}
@endif @endforeach