• Instructions to Ask a Question

    For any assistance, please click the "Ask a Question" button and select the Pabbly product for which you require support.

    We offer seven comprehensive applications designed to help you efficiently manage and grow your business:

    Our support team endeavors to respond within 24 business hours (Monday to Friday, 10:00 AM to 6:00 PM IST). We appreciate your understanding and patience.

    🚀 Exclusive Lifetime Offers 🚀

    We invite you to take advantage of our special one-time payment plans, providing lifetime access to select applications:

    • 🔥 Pabbly Connect — Lifetime Access for $249View Offer
    • 🔥 Pabbly Subscription Billing — Lifetime Access for $249View Offer
    • 🔥 Pabbly Chatflow — Lifetime Access for $249View Offer

    Make a one-time investment and enjoy the advantages of robust business management tools for years to come.

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