<p>See Console</p>
<fieldset>
<legend>Adding more test data</legend>
<ul>
<li>Use <a href="https://json-schema-faker.js.org/">JSON Faker to generate new rows for <code>data</code></a></li>
<li>Use the slightly modified schema from the ticket to generate data from</li>
</ul>
</fieldset>
JavaScript
const data = [{
"accountId": "a3d060b5-c795-4415-a3a5-1b39f0134d2f",
"createdAt": 0,
"conditions": [{
"key": "location",
"resourceId": "test",
"resource": "application"
}],
"priorityOrder": 0,
"type": "offer"
}, {
"accountId": "598ab41a-b3b9-4f66-b063-847c8e217199",
"createdAt": 0,
"conditions": [{
"key": "commitment",
"resourceId": "Manager",
"resource": "application"
}],
"priorityOrder": 0,
"type": "offer"
}, {
"accountId": "cc79ac4a-0d07-4a33-9f6e-d14ddb364769",
"createdAt": 0,
"conditions": [{
"key": "department",
"resourceId": "test",
"resource": "application"
}],
"priorityOrder": 0,
"type": "offer"
}, {
"accountId": "545cad6d-7085-4e30-9e3e-591c0cd8d3a8",
"createdAt": 0,
"conditions": [{
"key": "department",
"resourceId": "test",
"resource": "application"
},
{
"key": "team",
"resourceId": "test2",
"resource": "application"
}
],
"priorityOrder": 0,
"type": "offer"
}];
// Modify this function to test how long it takes to run the filter on the given data set
function findDuplicates(data) { return data;}
console.time('find duplicates');
console.log(findDuplicates(data));
console.timeEnd('find duplicates');
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.