code: 

```
$prop_map = DB::table('jk_property_map_jpm')->select('jpm_location','jpm_longitude','jpm_latitude')->where('jpm_location','like','%'.$par2.'%')->get();
foreach($prop_map as $k)
{
    $array = array(
                    $k->jpm_location,
                    $k->jpm_latitude,
                    $k->jpm_longitude
                    );
    $data['map'] = json_encode($array);
    echo $data['map'];
}

```

API:

```
[
  "California Frazier Park 93222 15501 Nesthorn Way",
  "34.852633",
  "-119.149963"
][
  "Oakhurst,Gold Country,California,United States",
  "37.3392607",
  "-119.7114921"
][
  "Club de Golf Fonatur, San Jos\u00c3\u00a9 del Cabo, Baja California Sur, Mexico",
  "23.0522956",
  "-109.6987974"
]

```

In this code I am simply used json\_encode to create an API and here I am getting unexpected output as I mention above. I want data as mention below:

```
[   
    [
      "California Frazier Park 93222 15501 Nesthorn Way",
      "34.852633",
      "-119.149963"
    ],
    [
      "Oakhurst,Gold Country,California,United States",
      "37.3392607",
      "-119.7114921"
    ],
    [
      "Club de Golf Fonatur, San Jos\u00c3\u00a9 del Cabo, Baja California Sur, Mexico",
      "23.0522956",
      "-109.6987974"
    ]
]

```

So, How can I create like this? Please help me.

Thank You