JSFiddle - React, Tailwind, and code Playground
HTML
<table id="attendees" class="attendees">
<thead>
<tr style="border-bottom: double;border-color: #007fff" ;="">
<th>Full Name</th>
<th>Membership Type</th>
<th>Membership Expiration Date</th>
<th>Free Vouchers</th>
<th>Classes From Pack Remaining</th>
<th>Yelp Check in</th>
<th>Payment Option</th>
<th>status</th>
<th>Remove</th>
</tr>
</thead>
<tbody>
<tr class="data">
<td class="inputValue">Students Name</td>
<td class="inputValue">N/A</td>
<td class="inputValue">N/A</td>
<td class="inputValue">0</td>
<td class="inputValue">0</td>
<td class="inputValue">Yes</td>
<td>
<ul id="list">
<select id="payment" class="inputValue" name="payment">
<option>Cash/Credit</option>
<option>Free Voucher</option>
<option>Yelp Check-in</option>
</select>
</ul>
</td>
<td><input type="checkbox" class="inputValue"></td>
<td>
<div><a href="#" class="remove"><p>Remove</p></a>
</div>
</td>
</tr>
</tbody>
</table>
<input id="submit" type="button" value="submit" />
JavaScript
$("#submit").on('click', function (e) {
e.preventDefault();
var data = $("#attendees tr.data").map(function (index, elem) {
var ret = [];
$('.inputValue', this).each(function () {
var d = $(this).val() || $(this).text();
ret.push(d);
console.log(d);
if (d == "N/A") {
console.log(true);
}
if(d == "on"){
var flag = 0;
$.each($("input[type='checkbox']:checked"), function(){
flag = 1;
});
ret.push(flag);
}
});
return ret;
});
console.log(data);
console.log(data[0]);
});