How to keep new lines intact when I scrape as text

I am scraping https://www.vitacost.com/glutino-gluten-free-crackers-original-4-4-oz

When it comes to the Nutrition Facts table on the right, I am finding that if I select as Text, I get strange formatting in the outputted text. I am currently grabbing 'table.ifITbl tr:nth-of-type(2) td, div.ifChrt' as text.

I would like to get text only but would also like to maintain line breaks so that the text is readable. How can i do that?

Thanks.

Hello there!

It can be done using grouping by Element selector, then picking same-type elements by text selector.

Try this one:

{"_id":"vitacost","startUrl":["https://www.vitacost.com/glutino-gluten-free-crackers-original-4-4-oz"],"selectors":[{"id":"chart","type":"SelectorElement","parentSelectors":["_root"],"selector":"div.ifChrt tr:even:nth-of-type(n+3)","multiple":true,"delay":0},{"id":"Type","type":"SelectorText","parentSelectors":["chart"],"selector":"td.ifNcol","multiple":false,"regex":"","delay":0},{"id":"Amount p/Serve","type":"SelectorText","parentSelectors":["chart"],"selector":"td.ifAcol","multiple":false,"regex":"","delay":0},{"id":"Daily Val","type":"SelectorText","parentSelectors":["chart"],"selector":"td.ifDVcol","multiple":false,"regex":"","delay":0}]}