I have a server response with data that needs to be converted to JSON using JavaScript.
country=Philippines\r\n
countryid=840\r\n
operator=Globe Telecom Philippines\r\n
operatorid=246\r\n
connection_status=100\r\n
destination_msisdn=639358661725\r\n
destination_currency=PHP\r\n
product_list=25,50,150,300,500,1000\r\n
retail_price_list=0.70,1.40,4.10,8.10,13.50,27.00\r\n
wholesale_price_list=0.56,1.10,3.26,6.49,10.80,21.58\r\n
authentication_key=1429269579325\r\n
error_code=0\r\n
error_txt=Transaction successful\r\n
Seeking assistance to convert this data structure into JSON format using JavaScript. Any guidance or pointers would be appreciated.