After using the command {{$employees}}
in my laravel controller to pass data to the blade view, I am receiving the following information:
[{"id":"1","name":"june"},{"id":"2","name":"joan"}]
When trying to parse this JSON data in my JavaScript as shown below:
<script>
var jsonData = $.parseJson('{{$employees}}');
alert(1);
</script>
An error is being thrown because the alert is not displaying. How can I resolve this issue?