Node.js examples for Array:Convert Array
Convert Array to Json and deal with null value
Array.prototype.toJSON = function(){ for(var i=0,json=[];i<this.length;i++) json[i] = (this[i] != null) ? this[i].toJSON() : "null"; return "["+json.join(", ")+"]" }