Show entire json in a column

Show entire json in a column

edcaronedcaron Posts: 2Questions: 0Answers: 0

I'm auditing a software saving the changes that the user do on a table in json format like:
old_values { name : old name, email : oldemail}
new_values { name : new name, email : newemail}

Now i'm trying this { data : 'old_values' } and it show's' [object Object]

Can i show the entire json format on a single databales column? Object]

Replies

  • allanallan Posts: 63,799Questions: 1Answers: 10,514 Site admin

    You'd need to stringify it, since the browser will effectively do a toString on your object when it is written into the HTML. For example:

    {
      data: 'old_values',
      render: function ( data ) {
        return JSON.stringify( data );
      }
    }
    

    Allan

  • edcaronedcaron Posts: 2Questions: 0Answers: 0

    Tank you soo much, Allan. It's working :D

This discussion has been closed.