Columns and data from JSON not working

Columns and data from JSON not working

MtamaraMtamara Posts: 3Questions: 1Answers: 0

Hello,
I'm facing problems to display the data from Ajax response correctly. In our application I get both columns and table data as a response from Ajax call. Here is a simplified test case with the JSON object that I get as response:
https://jsfiddle.net/gqwvosmz/

When trying to initialize the Data Table, I'm getting the following warning:
DataTables warning: table id=customView - Requested unknown parameter '<span data-i18n="viewHeader.lotNumber">Los-Nr.</span>' for row 0, column 1.
Only the first column is rendered correctly.

I would appreciate your help. Thank you.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 64,032Questions: 1Answers: 10,555 Site admin
    Answer ✓

    Its probably the . in

    <span data-i18n=\"viewHeader.lastUpdate\">letzte Änderung</span>

    That said, I would suggest not using HTML as a JSON key. Could you just use lastUpdate?

    Allan

  • MtamaraMtamara Posts: 3Questions: 1Answers: 0

    Hi @allan, thanks a lot for your answer. Yes, the problem is "." in JSON.

  • MtamaraMtamara Posts: 3Questions: 1Answers: 0

    @allan could you please tell me what would be the best way to reload the data in such table where both columns and table data are dynamic?

This discussion has been closed.