postSubmit - Is it possible to update the json array with contents from the data object

postSubmit - Is it possible to update the json array with contents from the data object

cj1005cj1005 Posts: 142Questions: 45Answers: 1

Description of problem:
The problem is certain symbols are displaying incorrectly within my datatable.
I've used postSubmit to view the returned ajax request data and I can see the symbols are correct within the 'data' object but they are incorrect within the 'json' array (which I understand is used to update the actual datatable).

So, I was hoping to intercept the update by using the postSubmit event and simply copy the correct data from the data object into the json array before it is passed to the datatable, is this possible? And if so, how might I go about achieving this?

Thanks, Chris

ps. Apologies for the all the questions recently

Answers

  • cj1005cj1005 Posts: 142Questions: 45Answers: 1

    My postSubmit code:

        qsjob_editor.on('postSubmit', function (e, json, data, action, xhr) {
            console.log(data); // The symbols are correct in here
            console.log(json.data[0]); // The symbols are incorrect in here
        });
    
  • cj1005cj1005 Posts: 142Questions: 45Answers: 1

    Please ignore this as my issue is now solved, thanks

This discussion has been closed.