• 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

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?
 

Supreme

Well-known member
Staff member
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