I have been trying this for hours(I am new to web development). I need to access a table which contains many columns one of which contains rows of people's names, and put them in a data structure. In each row the id for the text which holds the person's name is setup like this:
<span class="myClass" id = "first"> JOHN DOE </span> == $0
<span class="myClass" id = "second"> BOB DAVID </span> == $0
These rows are very, very deep inside of a table of tables of tables, etc...
I tried
var n = document.getElementsByClassName(".myClass");
and
var n = document.querySelectorAll(".myClass");
and
n = $(".myClass");
but have not had any luck.
Is there a different way to access certain classes/ids deep inside this structure?
EDIT: There were multiple close answers, but I accepted the one by the user most willing to help, and tailored mostly for my particular circumstance.