Morck
Member
Hi is there a way to change a string to a integer in a JSON? The platform we are sending the data from is for some reason sending a number as a string and it prevents us from sending it to the receiving platform. We want to change the discount to a integer JSON below.
[{"id":112,"estimate_id":145,"ordering":0,"item_id":2,"name":"Foldeglas - LGR","description":"Stelfarve: RAL 9005 (Sort)\nGlas: 10mm\nTopprofil: Teleskobprofil\nBundprofil: Lavt bundprofil\nLister: Gummilister mellem glas og væg - Vinterlister\nGreb: Dørhåndtag samt glasgreb\nPersienner: Ingen","unit_price":2000,"unit_id":1,"quantity":1,"tax1":25,"tax1_included":0,"tax1_amount":400,"tax2":0,"tax2_included":0,"tax2_amount":0,"discount_amount":400,"discount":"20","discount_is_percent":1,"sub_total":1600,"tax_total":400,"total":1600,"extra_fields":null,"ref":"","ref_id":"","type":10},{"id":113,"estimate_id":145,"ordering":1,"item_id":2,"name":"Foldeglas - LGR","description":"Stelfarve: RAL 9005 (Sort)\nGlas: 10mm\nTopprofil: Teleskobprofil\nBundprofil: Lavt bundprofil\nLister: Gummilister mellem glas og væg - Vinterlister\nGreb: Dørhåndtag samt glasgreb\nPersienner: Ingen","unit_price":23000,"unit_id":3,"quantity":1,"tax1":25,"tax1_included":0,"tax1_amount":5750,"tax2":0,"tax2_included":0,"tax2_amount":0,"discount_amount":0,"discount":"0","discount_is_percent":0,"sub_total":23000,"tax_total":5750,"total":23000,"extra_fields":null,"ref":"","ref_id":"","type":10},{"id":114,"estimate_id":145,"ordering":2,"item_id":2,"name":"Foldeglas - LGR","description":"Stelfarve: RAL 9005 (Sort)\nGlas: 10mm\nTopprofil: Teleskobprofil\nBundprofil: Lavt bundprofil\nLister: Gummilister mellem glas og væg - Vinterlister\nGreb: Dørhåndtag samt glasgreb\nPersienner: Ingen","unit_price":4000,"unit_id":3,"quantity":1,"tax1":25,"tax1_included":0,"tax1_amount":1000,"tax2":0,"tax2_included":0,"tax2_amount":0,"discount_amount":0,"discount":"0","discount_is_percent":0,"sub_total":4000,"tax_total":1000,"total":4000,"extra_fields":null,"ref":"","ref_id":"","type":10}]
[{"id":112,"estimate_id":145,"ordering":0,"item_id":2,"name":"Foldeglas - LGR","description":"Stelfarve: RAL 9005 (Sort)\nGlas: 10mm\nTopprofil: Teleskobprofil\nBundprofil: Lavt bundprofil\nLister: Gummilister mellem glas og væg - Vinterlister\nGreb: Dørhåndtag samt glasgreb\nPersienner: Ingen","unit_price":2000,"unit_id":1,"quantity":1,"tax1":25,"tax1_included":0,"tax1_amount":400,"tax2":0,"tax2_included":0,"tax2_amount":0,"discount_amount":400,"discount":"20","discount_is_percent":1,"sub_total":1600,"tax_total":400,"total":1600,"extra_fields":null,"ref":"","ref_id":"","type":10},{"id":113,"estimate_id":145,"ordering":1,"item_id":2,"name":"Foldeglas - LGR","description":"Stelfarve: RAL 9005 (Sort)\nGlas: 10mm\nTopprofil: Teleskobprofil\nBundprofil: Lavt bundprofil\nLister: Gummilister mellem glas og væg - Vinterlister\nGreb: Dørhåndtag samt glasgreb\nPersienner: Ingen","unit_price":23000,"unit_id":3,"quantity":1,"tax1":25,"tax1_included":0,"tax1_amount":5750,"tax2":0,"tax2_included":0,"tax2_amount":0,"discount_amount":0,"discount":"0","discount_is_percent":0,"sub_total":23000,"tax_total":5750,"total":23000,"extra_fields":null,"ref":"","ref_id":"","type":10},{"id":114,"estimate_id":145,"ordering":2,"item_id":2,"name":"Foldeglas - LGR","description":"Stelfarve: RAL 9005 (Sort)\nGlas: 10mm\nTopprofil: Teleskobprofil\nBundprofil: Lavt bundprofil\nLister: Gummilister mellem glas og væg - Vinterlister\nGreb: Dørhåndtag samt glasgreb\nPersienner: Ingen","unit_price":4000,"unit_id":3,"quantity":1,"tax1":25,"tax1_included":0,"tax1_amount":1000,"tax2":0,"tax2_included":0,"tax2_amount":0,"discount_amount":0,"discount":"0","discount_is_percent":0,"sub_total":4000,"tax_total":1000,"total":4000,"extra_fields":null,"ref":"","ref_id":"","type":10}]