JSFiddle - React, Tailwind, and code Playground

by TrueBlueAussie

HTML

<table>
    <tr>
        <td class="desc-col"><span>A span</span>Good Stuff
            <div class="options">
                <ul>
                    <li> <em>Price</em>
$800.00</li>
                </ul>
            </div>
        </td>
        <td class="desc-col"><span>Another span</span>Awesome Stuff
            <div class="options">
                <ul>
                    <li> <em>Price</em>
$200.00</li>
                </ul>
            </div>
        </td>
    </tr>
</table>

JavaScript

var Array = $("td.desc-col").map(function () {
    return $.trim($(this).contents().filter(function() {
        return this.nodeType === 3; //Node.TEXT_NODE
      }).first().text());
}).get();
console.log(Array);