• 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.

How to extract data from JSON based on condition?

bonordlin

Member
From an API I get a response like this

2. Response : [{"2267605":"UH-Karriar_Amandas_ m annons och partner"},{"2273773":"UH-Karriar_Amandas_ 2 nyheter m annons och partner r"},{"2276783":"UH-Upphandlare_Amandas"},{"2276790":"UH-Leverantör_Amandas"},{"2279120":"INKO_Upphandlare_Amandas- plats, annons, utbildning och Partner"},{"2279626":"INKO-leverantörer-Amandas_annons, utbildning och Partner"},{"2280986":"UH ...

I would like to
1) Grab the last post where the test starts with "UH-upphandlare" and grab the preceeding number (in this case 2276783) and use that number in a subsequent step in Pabbly.
How do I identify the last entry that contains a certain string, and how to I obtain the number accompanying that string?
 
P

Pabblymember11

Guest
Hey @bonordlin

You can make use of the Code by Pabbly action step to break the JSON into two parts or more. With the help of OpenAI, you generate the code accordingly.

1709809737912.png
 
Top