Most probably your response is already a JavaScript object and it not required to be parsed.
Remove the line var json = JSON.parse(response); and your code should work.
Most probably your response is already a JavaScript object and it not required to be parsed.
Remove the line var json = JSON.parse(response); and your code should work.