I have to display a dynamic Json response coming from the server which looks something like this
{
responseBody: {
menu: {
id: 'file',
value: 'File',
},
},
}
status: 200,
}
I am parsing the responseBody string to pretty print it. But, I have to display the responseBody (which can be JSON, XML or string) with line numbers like this Picture example
How can display this response along with the line number?