Array syntax on array of objects

Array syntax on array of objects

Seb33300Seb33300 Posts: 7Questions: 3Answers: 0
edited June 9 in Free community support

Hi,

The column data option accepts an array notation to render a list of values as text:

For example: name[, ] would provide a comma-space separated list from the source array.

But it looks like it doesn't work as expected when using it on an array of objects:

users[ / ].name

Names are rendered with a comma:

Name1,Name2

Am I missing something?

Thank you

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 64,540Questions: 1Answers: 10,667 Site admin
    Answer ✓

    Hi,

    It appears to work okay as far as I can tell. I put this little test case together to check, based on your users[ / ].name: https://live.datatables.net/batefobo/1/edit .

    Does that align with the data format you are using? Perhaps you can link to your page showing the issue or modify my test case to show the problem?

    Allan

  • Seb33300Seb33300 Posts: 7Questions: 3Answers: 0

    My bad, I had 2 columns with a similar name and I was not looking at the correct one :#

Sign In or Register to comment.