JSFiddle - React, Tailwind, and code Playground
HTML
<script type="text/x-data">
some text
</script>
<script type="text/javascript">
var txt = $('script[type="text/x-data"]').text();
alert(txt)
</script>
<script type="text/x-data">
some text
</script>
<script type="text/javascript">
var txt = $('script[type="text/x-data"]').text();
alert(txt)
</script>