0

I have the following line being printed on my screen:

Would you like to pay €xx to POS_ID Latte  X 1....€2.50-Salad  X 1....€4.00-Wrap  X 1....€4.50-Coffee X 2....€3.00-

What I want is for it to look like this:

Would you like to pay €xx to POS_ID
"Latte  X 1....€2.50-
Salad  X 1....€4.00-
Wrap  X 1....€4.50-
Coffee X 2....€3.00-".

I am creating this message by parsing the following JSON:

{"action":"POS_clear","id":"POS_ID","paramater":"14.00", "purchaseList":"Latte  X 1....€2.50-Salad  X 1....€4.00-Wrap  X 1....€4.50-Coffee X 2....€3.00-", "ClientID":"1234"}

What I had done originally was used /n instead of - but then I ran into trouble parsing the JSON (because of the /) so I swapped the slash for a dash and thought I could splice it somehow? But I'm a bit lost. All help appreciated!

1 Answer 1

3

Since they are showing up in HTML page, try replacing the dashes with html tag <br>.

Sign up to request clarification or add additional context in comments.

1 Comment

literally just thought of that a minute before seeing this! Thanks :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.