Answers for "json array in hidden field not coming"

0

json array in hidden field not coming

> encodeURIComponent(JSON.stringify({"name":"John"}))
> "%7B%22name%22%3A%22John%22%7D"



> var data = JSON.parse(decodeURIComponent(div.getAttribute("data-json")))
> console.log(data)
> Object {name: "John"}
Posted by: Guest on July-09-2020

Code answers related to "json array in hidden field not coming"

Code answers related to "Javascript"

Browse Popular Code Answers by Language