JSON对象数组逗号后没有空格

Here is my json array: Updated

    {
  "Title": "Limitless",
  "Year": "2011",
  "Rated": "PG-13",
  "Released": "2011-03-18",
  "Runtime": 105,

  "Actors": [
    "Bradley Cooper",
    "Robert De Niro",
    "Abbie Cornish",
    "Andrew Howard"
  ]

}

Here is my php return:

return response()->json($movie);

The Jquery:

$("#stars").val(data.Actors); //Nothing fancy about this. Just outputting data to an input field.

Result:

Bradley Cooper,Robert De Niro,Abbie Cornish,Andrew Howard

Why are there no spaces in between the names/comma's? Is there a way to achieve this without/with regex? Or is it a parsing error?

you should be writing it as

$("#stars").val(data.Actors.join(', '))

You can try this... Implode with comma space.

Snippet

return response()->json(implode(', ', $movie->Actors));

We have imploded with , (comma + space)