convert php array to a javascript array in this particular case: component is a string, recipes is also a string in the format “”recipe1″,”recipe2″”

this is what I did. The following code creates a php arrray with component as id ajnd recipes as values. An example is at component “vodka”(string) we have recipes(“”recipe1″,”recipe2″”recipe3″”) the recipes are also in a format of a string. The array is $menuThings

[1]: https://i.stack.imgur.com/PJrU1.png