JSFiddle - React, Tailwind, and code Playground

by joycse06

HTML

<div id="test"></div>

JavaScript

var product = {
    title: "abc",
    description: "lorem ipsum",
    price: 25.19,
    img: "http://www.www.www/img.png",
    link: "http://www.stackoverflow.com"
};
$('#test').data('ft',JSON.stringify(product));

console.log('Raw: ', $('#test').data('ft'));

console.log('Object: ',$.parseJSON($('#test').data('ft')));