Answer the question
In order to leave comments, you need to log in
Line break when parsing JSON, how to overcome?
I use metronic datatables:
JSON parses a cycle in which jang variables (left as an example one order.notes with which the problem arose)
var dataJSONArray = JSON.parse('[{% for order in orders %} ' +
'{"orderNotes":"{{ order.notes }}"}\n' +
'{% if not forloop.last %},{% endif %}' +
'{% endfor %}]');
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question