I am working with a controller called Map1 that returns a JSON object. Within my scripts folder, there is a .js file named init.js. In this file, I am attempting to call the controller using the following code:
$(document).ready(function() {
$.getJSON("/USER_CANCEL/Map1"),
function(data)
{
console.log(data);
}
However, when I check the console, I only see "null". I am confident that the Controller is not returning null. It seems like my js method for calling the controller is not functioning properly. How can I resolve this issue? Thank you.