Seeking a solution to efficiently display a dynamic Json response received from the server, the structure of which typically resembles:
{
responseBody: {
menu: {
id: 'file',
value: 'File',
},
},
}
status: 200,
}
The aim is to pretty print the responseBody by parsing it as a string. Additionally, there is a requirement to showcase the responseBody (which could be in JSON, XML or string format) with line numbers akin to this example image.
Any insights on how to effectively display this response alongside line numbers?