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

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

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -