I am using the jQuery's `$.get` function to get a JSON response from the server.

```
$.get(SITE_EDIT_HOME_URL,{key: key},function(r){
   r = JSON.parse(r);
   console.log(r);
});

```

And this is how I receive the request and send a response

```
def group_fields
   respond_to do |format|
       format.js do
           @group_fields = @site.theme.group(params[:key],@site);
           return render json: @group_fields
       end
   end
end

```

Inspecting the network, this is what Chrome receives as a response:

```
{"type":"group","fields":[1,2,3,4]}

```

A proper JSON string. But the success callback function is not executed and no errors are shown. What is wrong? How can I make this work? Do I HAVE to create the `group_fields.js`? I tested and this last idea works, but I lose the context of the callback function.

Thanks in advance