Javascript, submitting string to JSON file through server, line breaks not working -


having bit of issue. using firebase project , stores data in json file. when creating object push firebase in code this:

customers.child(uniqueid).set({     first_name: addcustomerdialogfirstname.value.tostring(),     last_name: addcustomerdialoglastname.value.tostring(),     email: addcustomerdialogemail.value.tostring(),     organization: addcustomerdialogorganization.value.tostring(),     address: addcustomerdialogaddressone.value.tostring() + ', ' +              addcustomerdialogaddresstwo.value.tostring() + '\\n' +              addcustomerdialogaddresscity.value.tostring() + ', ' +              addcustomerdialogaddressstate.value.tostring() + ' - ' +              addcustomerdialogzip.value.tostring(),     phone: addcustomerdialogphonecountrycode.value.tostring() +            addcustomerdialogphoneareacode.value.tostring() +            addcustomerdialogphonerest.value.tostring() }); 

i'm confused how display in json file. when @ json file on firebase reads (value of address two)\\n(value of address - city) , doesn't see \\n isn't part of string. idea how display in json file? i've never worked json before i'm bit of noob. thanks!

why escaping new line character? should \n.


Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Using jquery append to add option values into a select element not working -

javascript - Restarting Supervisor and effect on FlaskSocketIO -