{"ScriptPreparationCode":"var max1 = 100000; // 100,000 (100 Thousand)\r\nvar max2 = 10000000; // 10,000,000 (10 Million)\r\nvar max3 = 100000000; // 100,000,000 (100 Million)\r\n\r\nvar dataset = [...Array(max1)].map((_, index) =\u003E {\r\n const res = { id: index };\r\n\r\n const prop1 = index % 2 === 0 ? { prop1: 1 } : {};\r\n\r\n const prop2 = index % 10 === 0 ? { prop2: true } : {};\r\n\r\n return { ...res, ...prop1, ...prop2 };\r\n});\r\n\r\n\r\nvar toCreate = [];\r\nvar toUpdate = [];\r\nvar toDelete = [];","TestCases":[{"Name":"Native","Code":"for (const data of dataset) {\r\n\tif (_.has(data, \u0027prop1\u0027)) {\r\n\t\ttoCreate.push(data);\r\n\r\n\t\tcontinue;\r\n }\r\n\r\n\tif (_.has(data, \u0027prop2\u0027)) {\r\n \ttoDelete.push(data);\r\n\r\n \tcontinue;\r\n \t}\r\n\r\n \ttoUpdate.push(data);\r\n}","IsDeferred":false},{"Name":"Lodash.js","Code":"const create = dataset.filter((dp) =\u003E _.has(dp, \u0027prop1\u0027));\r\n\r\nconst deleted = dataset.filter((dp) =\u003E _.has(dp, \u0027prop2\u0027));\r\n\r\nconst update = dataset.filter((dp) =\u003E !_.has(dp, \u0027prop1\u0027) \u0026\u0026 !_.has(\u0027prop2\u0027));","IsDeferred":false}]}