The background JSON string is
[{"Name": "Reimbursement Request", "id": "Start"}, {"Name": "Department manager approval", "id": "Departaudit"}, {"Name": "General manager Approval", "id": "Bossaudit"}, {"Name": "Finance manager Approval", "id": "Financeaudit"}]
Error uncaught syntaxerror:unexpected identifier recognition errors when returning to the front page
At first I thought it was a JSON format problem, not really.
My carelessness did not take a good look at how I get this value, backstage I put the string into the model and return to the front-end view. JS value var actstr = "${actstr}"; The unexpected identifier error occurs because the double quotation marks are enclosed in double quotes. The workaround is to change the double quotation marks to single quotes, i.e. var actstr = ' ${actstr} '.
Background return JSON string page JS error uncaught syntaxerror:unexpected identifier