I am new to AJAX and javascript . In my project, I have to get the json object in my javascript file. I used spray-json and it shows me the json object in the url. http://localhost:8081/all-modules
{ "status": "S1000", "description": "Success", "results": ["module1", "module2", "module3"] }
My Ajax call
$.ajax({ url: 'http://localhost:8081/all-modules', dataType: 'application/json', complete: function(data){ alert(data) }, success: function(data){ alert(data) }
It returns a warning [object Object] . What is the problem?
json javascript jquery ajax
Shashika
source share