Passing (laravel) Array in Javascript
you can use json_encode()
var array = {{ json_encode($theArray) }};
or parse the json string using JSON.parse()
var array = JSON.parse('{{ json_encode($theArray) }}');
var app = @json($array);
Works like a charm
This works for me :)
var array = {!! json_encode($theArray) !!};