How can I remove wrapper (parent element) without removing the child? How can I remove wrapper (parent element) without removing the child? jquery jquery

How can I remove wrapper (parent element) without removing the child?


Pure JS (ES2015) solution, in my opinion easier to read than jQuery-solutions.

node.replaceWith(...node.childNodes)

Node has to be an ElementNode