Replacing & in JS code on pages

I ended up doing this and it works:

var data = {
    called: 'CAP',
    captcha: $("#captcha_txt").val()
};

$.get("../form/master.php",data,function(response){
....
});