How do I copy an array of objects output from the console console?

I want to copy the array of objects output from the console to the editor, but after copy, the editor becomes like this

<script type="text/javascript">
        var json = [Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object]0: Object1: Object2: Object3: Object4: Object5: Object6: Object7: Object8: Object9: Object10: Object11: Object12: Object13: Object14: Object15: Object16: Object17: Object18: Object19: Objectlength: 20__proto__: Array[0]
    </script>

is there any way to copy?

Dec.11,2021

convert to a string first

JSON.stringify(data)

then it's very simple

Menu