JSFiddle - React, Tailwind, and code Playground

by Akram kamal

HTML

<section id="SSID" data-texts='["Text1", "Text2", "Text3"]'></section>

JavaScript

$(function() {
    var texts = $("#SSID").data("texts");
    
    console.log(texts.length);  // logs "3"
});