My table has below structure
<table class=table-class-01>
<tbody>
<tr>
<td>
<span class=field-type01> Key01</span>
</td>
<td>
<span class=field-type-02></span>
<span> Value-01
</td>
</tr>
<tr>
<td>
<span class=field-type01> Key02</span>
</td>
<td>
<span class=field-type-02></span>
<span> Value-02
</td>
</tr>
<tr>
<td>
<span class=field-type01> Key03</span>
</td>
<td>
<span class=field-type-02></span>
<span> Value-03
</td>
</tr>
<tr>
<td>
<span class=field-type01> Key04</span>
</td>
<td>
<span class=field-type-02></span>
<span> Value-04
</td>
</tr>
<tr>
<td>
<span class=field-type01> Key05</span>
</td>
<td>
<span class=field-type-02></span>
<span> Value-05
</td>
</tr>
<tr>
<td>
<span class=field-type01> Key06</span>
</td>
<td>
<span class=field-type-02></span>
<span> Value-06
</td>
</tr>
<tr>
<td>
<span class=field-type01> Key07</span>
</td>
<td>
<span class=field-type-02></span>
<span> Value-07
</td>
</tr>
<tr>
<td>
<span class=field-type01> Key08</span>
</td>
<td>
<span class=field-type-02></span>
<span> Value-08
</td>
</tr>
</tbody>
</table>
How do I find the fetch the value of 2nd td element (Value04) in 4th row ?
I am trying below code
let row = $('.table-class-01 tr').eq(3)
let column = row[1].text();
I am getting below error --
VM3590:3 ERROR: Execution of script 'My Script' failed! Cannot read property 'text' of undefined
I am new to jquery. Any help would be appreciated. Thanks in advance.
Read more here: https://stackoverflow.com/questions/65714574/how-do-i-find-the-value-of-2nd-column-td-element-of-4th-row-tr-element-in-jq
Content Attribution
This content was originally published by ADITYA WAGHOLIKAR at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.