I have an object that I am trying to parse through and delete properties that are empty. I'm having issues with javascript not equating the statement correctly.
var filters = { prop1 : "", prop2 : "set", prop3 : "" };
var f;
for( f in filters) {
if(filters[f] === "") {
delete filters[f];
}
}
Using google's debug console, I know that filters[f] have given me "" for prop1 and the statement of filters[f] === "" equates to true, yet it doesn't enter inside the if statement block.
filterbut you refer to it asfilterslater on.