JSFiddle - React, Tailwind, and code Playground

by Erik Woods

HTML

<a data-faq-trigger='{"flow":"purchase","page":"solution","question":"discountPoints"}' href="#">the console will display the data associated with this link, but this link does nothing.</a>

JavaScript

console.clear();
var faqData = $('[data-faq-trigger]').data('faqTrigger');
console.log(faqData["flow"]);
console.log(faqData["page"]);
console.log(faqData["question"]);