L
L
ligisayan2019-01-09 15:50:14
JavaScript
ligisayan, 2019-01-09 15:50:14

How to get data from hidden table fields?

Hello!
There is a demo of the wpdatatables table plugin
Question: how to get data from the hidden fields of the table in mobile resolution (for example, what genre are Adventure, Action, Science Fiction films) and write to an array?
Initially, only the names are displayed, and when opening any, we already see all the full information on it.
Access to data is probably in a hidden field encrypted in json

<input type="hidden" id="table_1_desc" value='{"tableId":"table_1","tableType":"mysql"...


You can access it right on the page on the fly right in the console and get the object, but I don’t know what to do next, because I see only the table structure itself, but not the data itself

var obj = JSON.parse(jQuery('#table_1_desc').val());
console.log(obj);

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question