0đź‘Ť
âś…
I solved the problem by adding the “parseJSON” after the “success”.
success: function(response) {
var json = $.parseJSON(response);
But I don’t understand the full concept of the solution.
Most examples I’ve seen parsing an array() from php to javascript through ajax don’t use the parseJSON conversion.
They just work with the response as if it already were an array and not a string.
Source:stackexchange.com