Evaluating params before serializing
<p>I'm building some functions to retrieve data whether you supply some params or don't. It will be used mostly with a geolocator function. Since it may provide (or not) the location, the function should be able to handle that but I'm not able to do that.</p>

<p>Here is the code:</p>

<pre><code>function getData(position,line,limit,attach){
        var JSONurl = 'getter.php';
        var params = [
            {   get: "stations",
                line: line,
                limit: limit,
                lat : position.coords.latitude,
                lng : position.coords.longitude
            }
        ];            
        console.log($.param(params));
    }
</code></pre>

<p>But it happens two things, $.param(params) give me undefined and also, when no position is supplied (so position is null) it gives me an error that it's not able to retrieve .cords o a null value (which is good).</p>

<p>How could I solve this?</p>
