in my controller
return view('admin.venue', ['cityList' => City::all()->toJson() ]);
and also i have tried it with
in my view
var allCities = {{$cityList}};
and also i have tried
var allCities = JSON.parse({{$cityList}})
and
var allCities = JSON.parse('{{$cityList}}')
but it reply below error , i think the problem is about double quot. what is the correct way to use laravel json response in javascript
SyntaxError: invalid property id
var allCities = [{&-quot;id":1,&-quot;name":"cityname&-quot;,&-quot;p