DEV Community

Discussion on: How to Copy a Big Object or Array From Console to Clipboard

Collapse
 
lionelrowe profile image
lionel-rowe

Awesome tip, I never knew about copy before! In your example, you don't need to Store as global variable though — you could just copy(bigObject) directly.

Collapse
 
vtrpldn profile image
Vitor Paladini • Edited

You're right! I've created bigObject so I could simulate something like:

fetch('http://example.com/movies.json')
  .then(response => response.json())
  .then(data => console.log(data.bigObject));

but I'm glad you caught that 😄