json array in hidden field not coming

Solutions on MaxInterview for json array in hidden field not coming by the best coders in the world

showing results for - "json array in hidden field not coming"
Ariana
04 May 2018
1> encodeURIComponent(JSON.stringify({"name":"John"}))
2> "%7B%22name%22%3A%22John%22%7D"
3
4
5
6> var data = JSON.parse(decodeURIComponent(div.getAttribute("data-json")))
7> console.log(data)
8> Object {name: "John"}