Solution in plain Javascript. It utilized an temporary object for counting and returns an array of objects with date and percentage. <!-- begin snippet: js hide: false --> <!-- language: lang-js --> var data = [{ "date": "1-1-2013", "answer": "yes" }, { "date": "1-1-2013", "answer": "no" }, { "date": "2-1-2013", "answer": "no" }, { "date": "2-1-2013", "answer": "no" }, { "date": "2-1-2013", "answer": " " //this is not answered! }, , { "date": "2-1-2013", "answer": "no" }]; function getPercentage(data) { var obj = {}; data.forEach(function (a) { if (~['yes','no'].indexOf(a.answer)) { obj[a.date] = obj[a.date] || { yes: 0, no: 0 }; obj[a.date][a.answer]++; } }); return Object.keys(obj).map(function (k) { return { date: k, percent: obj[k].yes * 100 / (obj[k].yes + obj[k].no) }; }); } document.write('<pre>' + JSON.stringify(getPercentage(data), 0, 4) + '</pre>'); <!-- language: lang-css --> <!-- language: lang-html --> <!-- end snippet -->