<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
var MyObject = JSON.parse(`[
{
"id": 4936002,
"providerTimestamp": 1741090420000,
"sportsbookTimestamp": 1741090421000,
"name": "Rio Ave FC U23 v Farense U23",
"startDate": "2025-03-04T11:00:00.000+0000",
"status": 3,
"providerStatus": "live",
"eventType": "Match",
"sportId": 1,
"categoryId": 500000019,
"leagueId": 679,
"competitors": [
{
"id": 2286,
"name": "Rio Ave FC U23",
"externalIds": {
"RampFeed": "49_Rio Ave FC U23",
"betradarUnified": "1111452101"
}
},
{
"id": 104958,
"name": "Farense U23",
"externalIds": {
"RampFeed": "49_Farense U23",
"betradarUnified": "1111823544",
"LSportsFeed": "711152724289"
}
}
],
"odds": [
{
"id": 1,
"name": "3 way ",
"outcomes": [
{
"id": 1202932129,
"outcome": "{$competitor1}",
"outcomeId": "1001",
"status": 0,
"oddValue": 81.0,
"providerTimestamp": "2025-03-04T12:12:49.000+0000",
"cashOutAvailable": false
},
{
"id": 1202932128,
"outcome": "draw",
"outcomeId": "1002",
"status": 0,
"oddValue": 26.0,
"providerTimestamp": "2025-03-04T12:12:55.000+0000",
"cashOutAvailable": true
},
{
"id": 1202932127,
"outcome": "{$competitor2}",
"outcomeId": "1003",
"status": 1,
"oddValue": 1.005,
"providerTimestamp": "2025-03-04T12:12:55.000+0000",
"cashOutAvailable": false
}
]
}
],
"externalIds": {
"RampProvider": null,
"RampFeed": "13474809",
"BetradarCtrl": "132657258",
"betradarUnified": "sr:match:56746411",
"betradar": "sr:match:56746411",
"aams": "3963227"
},
"additionalData": {
"subscription": {
"data": {
"id": "85ddb841047738e7abe7e360480e94fc",
"templateId": 1
}
},
"static": {
"venue": {
"name": "Estadio dos Arcos",
"city": "Vila do Conde",
"country": "Portugal"
},
"jersey": [
{
"base": "fefffe",
"number": "000000",
"sleeve": "f8f8f3",
"type": "third"
},
{
"base": "faf9f9",
"number": "220303",
"sleeve": "1b0202",
"type": "third"
}
],
"extraInfo": {
"RTS": "not_available",
"streaming": "false",
"auto_traded": "false",
"period_length": "45",
"neutral_ground": "false",
"coverage_source": "venue",
"extended_live_markets_offered": "false"
}
},
"periodId": {
"data": 7
},
"eventClock": {
"data": {
"currentPeriodStartTimestamp": 1741090041769,
"regularPeriodLength": 45
}
},
"scoreboard": {
"data": {
"currentHomeScore": "0",
"currentAwayScore": "3",
"periodScores": [
{
"homeScore": "0",
"awayScore": "3",
"periodType": "RegularPeriod",
"periodNumber": 1
}
],
"fullTimeHomeScore": "0",
"fullTimeAwayScore": "3"
}
},
"soccerStatistics": {
"data": [
{
"teamType": "HOME",
"redCards": 0,
"yellowCards": 1,
"yellowRedCards": 0,
"cornerKicks": 2
},
{
"teamType": "AWAY",
"redCards": 0,
"yellowCards": 1,
"yellowRedCards": 0,
"cornerKicks": 5
}
]
}
},
"oddsCount": 2,
"resultedOddsCount": 0,
"totalOddsCount": 3,
"enrichment": {
"animation": [
"betradarTracker"
]
},
"marketsCount": 1,
"enabled": true
}
]`);
var myCopy = null;
myCopy = _.cloneDeep(MyObject);
myCopy = structuredClone(MyObject);
--enable-precise-memory-info
flag.
Test case name | Result |
---|---|
Lodash cloneDeep | |
Native structuredClone |
This benchmark does not have any results yet. Be the first one to run it!