Phantomjs change object property inside page evaluate
<p>I'm new to JavaScript and PhantomJS. I'm trying to store links from a webpage and then modify. The problem is that I can't modify my array after <code>page.evaluate</code>.</p>

<pre><code>var player = 0;
var links = page.evaluate(function() {
    var a = document.querySelectorAll(".link[rel='nofollow']:not(#bg)");
    for(var i =0; i &lt; a.length; i++) {
        array.push({
            "html":a[i].innerHTML,
            "link":a[i].href
        }
        );
    }
   return array;
});

//Not setting 1 as a value
links[player]["link"] = 1;
</code></pre>

<p>I think that It's happening because I have already set player value when the function is executed, but is there way that I could modify this value?</p>