vishalkhialani 36 Junior Poster

Hi,
My script works perfectly but when I put in in the wordpress post the below variable is changed from

var initialData="\{\"0name\":\"Secret\",\"0brandStatus\": \"checked\",\"1name\":\"OldSpice\",\"1brandStatus\": \"checked\",\"2name\":\"Degree\",\"2brandStatus\": \"checked\",\"3name\":\"Dove\",\"3brandStatus\": \"checked\",\"4name\":\"Axe\",\"4brandStatus\": \"checked\",\"5name\":\"Maxim\",\"5brandStatus\": \"checked\",\"6name\":\"Nivea\",\"6brandStatus\": \"checked\",\}" ;

to

var initialData="{"0name":"Secret","0brandStatus": "checked","1name":"OldSpice","1brandStatus": "checked","2name":"Degree","2brandStatus": "checked","3name":"Dove","3brandStatus": "checked","4name":"Axe","4brandStatus": "checked","5name":"Maxim","5brandStatus": "checked","6name":"Nivea","6brandStatus": "checked",}";

How do I make sure the \ is not removed

thank you in advance.

Cheers,
Vishal

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.