For example given something like this
const stuff = [{"a": "b"}]
const inhtml = document.querySelector(".exists")
const pre = document.createElement("pre")
pre.appendChild(document.createTextNode(stuff))
inhtml.appendChild(pre)
I want it to output the array [{"a": "b"}] in a code block dynamically
Except it just outputs [Object object ...]