I have been trying to figure this out for the past week and everything that i try just doesn\'t seem to work.
I have to create a web service on my local box that re
The replacer
parameter of JSON.stringify
doesn't work quite like you're using it; check out the documentation on MDN.
You could use Array.prototype.filter
to filter out the elements you don't want:
var arr = [[],"d","B",{},"b",12,"A","c"];
arr = arr.filter(function(v) { return typeof v == 'string'; });
arr // => ["d", "B", "b", "A", "c"]