I have saved this string in javascript
js_str= '{"id":"1","user_id":"1","cat_id":"1","name_bz":"Chitwan National Park","name_cf":"Gokarna","cf_lattitude":"27.525","cf_longitude":"87.56","boundry":"[[27.0656,85.255],[27.3564, 85.3564],[27.98998, 85.6898]]\n","area":"989.948","forest_conditon":"Poor","natural_regeneration":"High","grazing_pressure":"Medium","forest_type":"Natural","wild_species_list":"Tiger, Leopard, Rhino","others":null}';
On using js_arr=JSON.parse(js_str)
it gives
SyntaxError: JSON.parse: bad control character in string literal at line 1 column 207 of the JSON data
column 207 is the space after comma [27.3564, 85.3564]
. The whitespace in this place is giving error. i cannot use regex to remove whitespace as it would replace all whitespaces.