How to use class variable in a ajax callback?
<p>I am new to javascript and I would like to know how I can access my class variable inside my ajax callback </p>

<pre><code>success: function(data) {
            var obj = jQuery.parseJSON(data);
            this.baralho = obj.countBaralho;
</code></pre>

<p>My Class</p>

<pre><code>var Placar = {
    descarte : 0,
    jogador1: 0,
    jogador2: 0,
    baralho: 0,

    fetchFromServer: function(){
        $.ajax({
            url: baseUrl+'get-placar',
            success: function(data) {
                var obj = jQuery.parseJSON(data);
                this.baralho = obj.countBaralho;
                this.descarte = obj.countDescarte;
                this.jogador1 = obj.numCartas1;
                this.jogador2 = obj.numCartas2;
            }
        });

    },

    update: function() {
        $('#num-cartas-1').html(this.jogador1);
        $('#num-cartas-2').html(this.jogador2);
        $('#cartas-restantes').html(this.baralho);
        $('#num-cartas-descarte').html(this.descarte);
    }

}
</code></pre>

<p>The values aren't being setted from the server, How can I fix it?</p>
