mData function

mData function

kaeankaean Posts: 2Questions: 1Answers: 0
edited October 2015 in Free community support

Hi!
I am trying to display in a column ( target:[0] in this case) every 10th first value of a Json object array.

aaData: {
"key" : "value"
}{
"key" : "value"
}{
"key" : "value"
}{
"key" : "value"
}{
"key" : "value"
}{
"key" : "value"
}{
"key" : "value"
}{
"key" : "value"
}{
"key" : "value"
}{
"key" : "value" <--- only this one
}

I think I could use mData function, but i'm newbie with datatables, can I have any help?

Thank you

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,755Questions: 1Answers: 10,509 Site admin
    Answer ✓

    Assuming you actually have an array of objects rather than the invalid syntax above, there is no option for that in DataTables. Rows are all equal in DataTables.

    having said that, I'm not actually sure I've understood your question. Perhaps you can illustrate with some real data and an image of what you are trying to do.

    Allan

  • kaeankaean Posts: 2Questions: 1Answers: 0

    Of course that was only an example array of objects,I'm sorry for the invalid syntax.

    I guess i could use a condition or a for loop function for mData or mRender to iterate over the array and display only the first value of the 10th,20th,30th object ecc... If this is not possible I understand, thank you for the answer anyway.

This discussion has been closed.