From ae7547706a386c5777482f8c649893ba04b12008 Mon Sep 17 00:00:00 2001 From: khush2706 Date: Mon, 1 Nov 2021 06:06:21 -0700 Subject: [PATCH] new branch --- csv2json.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/csv2json.js b/csv2json.js index 2fe4ce1..b9de512 100644 --- a/csv2json.js +++ b/csv2json.js @@ -27,6 +27,8 @@ fs.createReadStream('csv/data.csv') //giving each person a rank according to the number of labs completed for(let i = 1; i < results.length; i++){ + + if(results[i].totalLabs === results[i-1].totalLabs){ results[i].rank = rank //if the no of labs are same, give same rank } @@ -46,3 +48,7 @@ fs.createReadStream('csv/data.csv') ); }); + + + +