This question has already been answered:
- Sort rows in a table using jQuery 3 responses
There is a table with some values. How using pure js table values to output into an array of objects? To get something like arr = [{name: Vasya, age: 10}, {}]
<table id="grid"> <thead> <tr> <th data-type="number">Возраст</th> <th data-type="string">Имя</th> </tr> </thead> <tbody> <tr> <td>5</td> <td>Вася</td> </tr> <tr> <td>2</td> <td>Петя</td> </tr> <tr> <td>12</td> <td>Женя</td> </tr> <tr> <td>9</td> <td>Маша</td> </tr> <tr> <td>1</td> <td>Илья</td> </tr> </tbody> </table>
nameandage? - Grundynamebe Vasya instead of 5? Why is the keynamecalled at all? - Grundy