Menu
I want to store the “table id” so I can reuse the same code for different tables.
I store the table id name as “tsk_id” and “user_id”
“`
var table_id =”tsk_id”
var table_id = “user_id”
Hardcoded id looks like this:
`const row = document.querySelector(‘table tr[data-id=”‘ + data.tsk_id + ‘”]’);
But dynamically I want to do this (pseudo code)
`const row = document.querySelector(‘table tr[data-id=”‘ + data.[table_id] + ‘”]’);
Is this possible?