• Instructions to Ask a Question

    Click on the "Ask a Question" button and select the application for which you would like to ask questions.

    We have 5 different products namely - Pabbly Connect, Pabbly Subscription Billing, Pabbly Email Marketing, Pabbly Form Builder, Pabbly Email Verification.

    The turnaround time is 24 hrs (Business Hours - 10.00 AM to 6.00 PM IST, Except Saturday and Sunday). So your kind patience will be highly appreciated!

    🚀🚀Exclusive Discount Offer

    Just in case you're looking for any ongoing offers on Pabbly, you can check the one-time offers listed below. You just need to pay once and use the application forever -
     

    🔥 Pabbly Connect One Time Plan for $249 (🏆Lifetime Access) -  View offer 

    🔥 Pabbly Subscription Billing One Time Plan for $249 (🏆Lifetime Access) - View offer

Change string to integer in JSON.

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}]
 

ArshilAhmad

Moderator
Staff member
Hi @Morck,

Please record a short screen recording, elaborating a bit more on your use case and the issue. Also, share the Workflow URL in which you have this concern.
 

Fagun Shah

Well-known 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}]
Use Code action and ask chatgpt to write JS code for you
 
Top