Hi everyone this is a Laravel issue. I'm working on a directory site. I am trying to solve a problem like this: I need to populate an open street map with markers that are handled as javascript variables like this: 

```
var mapMarkers = [
{
    title: "Paolo",
    address: "Troy South End, 264 E. Berkley St, Boston",
    lat: 42.3432809,
    lng: -71.06297789999996,
    img: "assets/images/listings/1.jpg",
    category: "Restaurants",
    icon: "icon-dinner",
    featText: "~ $18-$90",
    rating: "4.9",
    link: "#"
},
{
    title: "Paolo",
    address: "5347 N Clark St, Chicago, IL",
    lat: 41.9794495,
    lng: -87.6679747,
    img: "assets/images/listings/2.jpg",
    category: "Restaurants",
    icon: "icon-dinner",
    featText: "Best fried chicken of the town",
    rating: "4.2",
    link: "#"
},
{
    title: "Paolo",
    address: "171 E Broadway, New York, NY",
    lat: 40.7138292,
    lng: -73.98966669999999,
    img: "assets/images/listings/5.jpg",
    category: "Restaurants",
    icon: "icon-dinner",
    featText: "Promotional Lunch $45",
    rating: "4.1",
    link: "#"
}
   ];

```

The problem is that I have this data inside a Laravel collection and I'm looking for the best way to passing them to the javascript:

```
    var mapMarkers = [
{
    title: $companies->name,
    address: $companies->address,
   ............
},

```

Can someone help to understand the best practice to solve this issue?