Ajax Object Merge

Ajax Object Merge

CodeSkilLsCodeSkilLs Posts: 1Questions: 1Answers: 0
edited August 2014 in Free community support

Hello,

I in example of ajax Objects mapping used like { "data": "name" } to use data[x].name to get value, how can I add more?
for ex. I need to have Name + Surname and it is returned like object user.name + user.surname.
So I need to have both like: { "data": "name surname" } (get data.name + ' ' + data.surname)

Thanks!

This question has an accepted answers - jump to answer

Answers

  • mRendermRender Posts: 151Questions: 26Answers: 13
    edited August 2014 Answer ✓
                { data: null,
                  render: function ( data, type, row ) {
                  return (data.tbl_Names.LastName+", "+data.tbl_Names.FirstName);
                }},
    
  • allanallan Posts: 63,552Questions: 1Answers: 10,477 Site admin

    There is further information and examples in the documentation: columns.render.

    Allan

This discussion has been closed.