1.
var data = ' Einvoice_cur_day: ' $ ' var encode = encodeuricomponent (data)//transcoding Console.log (encode)//einvoice_cur_day%3a% 2230%22var decode = decodeuricomponent (encode)//decode Console.log (decode)//Einvoice_cur_day: "30"
2.
Client this encoding format is passed to you
JS decoding
var d = '%7b%22taxno%22%3a%22910001200150542a%22%2c%22diskno%22%3a%22400444151032%22%2c%22vesion%22%3a%221.0.0.1% 22%2c%22token%22%3a%22b6357f4c-e2e2-4f47-8a26-5e40b6283a51%22%2c%22cinvoice_cur_day%22%3a%2210%22%2c% 22sinvoice_cur_day%22%3a%2220%22%2c%22einvoice_cur_day%22%3a%2230%22%2c%22minvoice_cur_day%22%3a%2225%22%2c% 22cinvoice_cur_month_rest%22%3a%22100%22%2c%22sinvoice_cur_month_rest%22%3a%22150%22%2c%22einvoice_cur_month_ Rest%22%3a%22500%22%2c%22minvoice_cur_month_rest%22%3a%2210%22%7d ' var decode = decodeuricomponent (d) Console.log ( Decode)//{"taxno": "910001200150542A", "Diskno": "400444151032", "Vesion": "1.0.0.1", "Token": " B6357f4c-e2e2-4f47-8a26-5e40b6283a51 "," Cinvoice_cur_day ":" Ten "," Sinvoice_cur_day ":" A "," Einvoice_cur_day ":" 30 ", "Minvoice_cur_day": "" "," Cinvoice_cur_month_rest ":" The "," Sinvoice_cur_month_rest ":" The "," Einvoice_cur_month_ Rest ":" "", "Minvoice_cur_month_rest": "10"}
JS decoding transcoding