I have the following element below that has a data attribute that contains a json string. I am unable to retrieve the json string, instead it is returning the opening bracket of the json string. Please see below.
console.log(document.getElementById('elem').getAttribute('data-hashtags'));
<input id="elem" data-hashtags="["john","barclays-statements","hmrc","laptop","tesco","meat","dinner","drinks","food","cleaning-products","taxi","lunch"]">