sullivan.mrr
sullivan.mrr
TTypebot
Created by sullivan.mrr on 3/31/2025 in #help-and-questions
Help loops Items Per Page
Hello, I made an API call and got a response with a variable allAds containing 5 items and a variable adsTotalItems with the number 5: I managed to loop through the 5 items, but now I want to implement a system for items per page. How could I do this? I have a variable itemsPerPage set to 2, so I want to display only 2 items with an option (yes/no) to show the next 2 items from allAds and the next 1 item to make it 5 in total. Is it possible to do this?
2 replies
TTypebot
Created by sullivan.mrr on 3/24/2025 in #help-and-questions
How to return multiple cities from the API and set a variable with the INSEE code when a city label
I made an API call to https://api-adresse.data.gouv.fr/search/. I would like to return x cities and when I click on one, it should set a variable with the INSEE code instead of the label displayed on the button. Is it possible to do this?
7 replies