Author Topic: html tags in json.stringify  (Read 1868 times)

queensgambit9

  • Pro Ultimate
  • Sr. Member
  • *
  • Posts: 341
    • View Profile
html tags in json.stringify
« on: June 09, 2020, 05:36:32 pm »
Trying to create clickable link inside json string... in column.render:

render: function (ui) {
        data = JSON.parse(ui.cellData)
        a = data.test
        a.forEach(function(i, j){
        data.test[j].attr ="<a href='http://www....' target='_blank'>test</a>"
            })
        }
        return JSON.stringify(data)

but it won't render correctly in browser...

queensgambit9

  • Pro Ultimate
  • Sr. Member
  • *
  • Posts: 341
    • View Profile
Re: html tags in json.stringify
« Reply #1 on: June 09, 2020, 07:44:36 pm »
Solved.