Updating a DataTable with a JSON array
Updating a DataTable with a JSON array
Link to test case:
https://jsitor.com/KwPPsHOUx
Description of problem:
I am really struggling knowing where to start with this current issue I am having.
I want to populate and replace the current value within a specific column ("group") in a table using a JSON array. The key of the array being the string that I want to be the cell value and the values of the array being the unique IDs that identify which rows to insert that string. I want this to be executed with the click of a button, which currently already builds the array based on row selection and input text.
I have provided an illustrative explanation below taken from the test case, to show want I want to achieve clearer:


Thank you
Ben
This question has an accepted answers - jump to answer
Answers
If I understand correctly you want to loop through all the selected rows and update the last column with the value in the
input. To do this userow().every()and therow().data()API to update the row data. See the updated example:https://jsitor.com/KwPPsHOUx
Kevin
Thank you