---
title: "Deep Copying Objects with the StructuredClone API"
url: https://daily.dev/posts/deep-copying-objects-with-the-structuredclone-api-wzqaznpmg
source_url: https://blog.openreplay.com/deep-copying-objects-with-the-structuredclone-api/
type: article
source: "asayer"
published: 2023-04-21T03:12:16.323Z
updated: 2023-04-21T03:12:16.321Z
tags: ["javascript"]
reading_time: 5
upvotes: 60
comments: 5
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Deep Copying Objects with the StructuredClone API

**[asayer](https://daily.dev/sources/asayer)** · 5 min read · 60 upvotes · 5 comments

## Summary

Deep Copying Objects with the StructuredClone API Back Copying objects has always been problematic because JavaScript does shallow copies, not producing an independent, separate new object. The new StructuredCopy API solves this problem, and in this article, you’ll learn all the details about its usage.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.openreplay.com/deep-copying-objects-with-the-structuredclone-api/>

## Community discussion

Top comments from developers on daily.dev.

**@desdevol** · 2 upvotes

> Nice, but seems like it's still consider quite new to be supported by browsers. Maybe we can ditch lodash's cloneDeep in the future.

**@digeomel** · 1 upvotes

> Was about time! I will keep using lodash for the time being, at least until we also get a native _.isEqual() and there's wide support in browsers. IMHO most (if not all) lodash methods should be provided natively, there's a reason why devs use them!

**@yaireo** · 0 upvotes

> Very slow method. I do not advise using it.

**@cassiolacerda** · 0 upvotes

> Node.js 17 and above is now supported.

**@ickarakurt** · 0 upvotes

> I remember that there was an article about performance comparison of deep clone ways, and structuredClone was really slow.
>
>  Not the best option to use I think

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 0 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments
- [CNCF Unveils Schedule for KubeCon \+ CloudNativeCon Europe 2026](https://daily.dev/posts/cncf-unveils-schedule-for-kubecon-cloudnativecon-europe-2026-ikhcoa5cb) · CNCF · 2 upvotes · 0 comments
- [CNCF Debuts KubeCon \+ CloudNativeCon Japan 2026 Schedule](https://daily.dev/posts/cncf-debuts-kubecon-cloudnativecon-japan-2026-schedule-xp5pyudub) · CNCF · 1 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript)

[View this post on daily.dev](https://daily.dev/posts/deep-copying-objects-with-the-structuredclone-api-wzqaznpmg)
