I get the following error (SyntaxError): missing ] after element listwhen using a function eval. The returned JSON is pretty simple, so I don't know where the error is.
(SyntaxError): missing ] after element list
eval
[{"title":"sfsdf","id":1}{"title":"m356","id":12}]
As an answer for completeness. Your JSON is invalid. You need a comma between these objects:
[{"title":"sfsdf","id":1},{"title":"m356","id":12}]
First you lost the comma between the Object, the second jQuery will automatically parse the object. I suggest you not to use this method. I also answer this question, but there are some differences from yours.
Source: https://habr.com/ru/post/1609901/More articles:Файл VM [number] вызывает Uncaught SyntaxError: Неожиданный идентификатор - javascriptJavascript "Expected"] "- jquerySCRIPT1007: expected error ']' for eval expression when converting a string to an array - javaSyntaxError: missing] after list of items in jquery - javaSyntaxError: missing] after list of items - javascriptUncaught SyntaxError: Unexpected identifier - error in Chrome VM - javascriptПрерывание запроса при навигации от компонента в реакторе - javascriptadd tags on mobile devices or for specific permissions - javascriptStrange behavior when changing a route - meteorAbsolute table header for generated table - javascriptAll Articles