How to copy the objects from chrome console window?

前端 未结 5 1675
被撕碎了的回忆
被撕碎了的回忆 2020-12-12 19:06

I have tried to copy the objects as text, but it show just [object object]. Before this I had tried with copy commend it was success but not now.Is that chr

5条回答
  •  醉酒成梦
    2020-12-12 19:34

    You can use command in console as follows: Let say our object is:

      var object = {x:"xyz"}
    

    Now use below command in console -

     copy(JSON.stringify(object))
    

    object is now available to clipboard.You can now use Ctrl + v to use this object.

提交回复
热议问题