How can I remove a property from an object if its value is zero?
var row = [{
2013: "0",
2014: "0",
2015: "95163",
carseries: "Sindelfingen"
},{
2013: "0",
2014: "38954",
2015: "0",
2016: "0",
carseries: "Bremen"
}];
Output should look like this:
var row = [{
2015: "95163",
carseries: "Sindelfingen"
},{
2014: "38954",
carseries: "Bremen"
}];
filter(). 2. Nothing about this is JSON. What you have is simply an array of objects. I amended the title/description/tags to reflect this 3. jQuery is primarily for amending the DOM, so is not needed for changing a data structure.