2π
As harish-reddy said, the dataType property sets the behaviour to what you expect the response to be. That said the βdataβ argument of the success function is already a JavaScript object.
Refer to http://api.jquery.com/jQuery.ajax/
As arpit-solanki mentioned the message property inside the response object is not an array, but is interpreted as a string (notice the starting βββ), therefor you either change the server side to send you an actual array or you must JSON.parse(data.message) to obtain its content.
π€joaolpinho
0π
The response you are receiving is already executed by JSON.stringify.Either you must use JSON.parse or change the logic at the server end
π€Abdur Rehman
- [Answered ]-Django: what is the difference between redirect to a view function and redirect to a url (from urls.py file)
- [Answered ]-Django Generic View Model Filtering
- [Answered ]-Pointing Django to Different Template Directory
Source:stackexchange.com