@caseguide wrote:
I would like to render some json with each bit between {} on its own line like so:
{“Question”:“WorkerId”,“Answer”:“123”}
{“Question”:“HITId”,“Answer”:“456”}
{“Question”:“Industry”,“Answer”:“789”}I tried using Markdown’s two spaces as shown below as well as trying to string replace with
<br>
. Whats the correct way to accomplish adding new lines to a string in Dash?newstring = '{"Question":"WorkerId","Answer":"123"} {"Question":"HITId","Answer":"456"} {"Question":"Industry","Answer":"789"} ' newstring = newstring.replace("} {","} {") html.P("{}".format(newstring)),
Posts: 1
Participants: 1