Mastering Dynamic Array Names in Make.com
Have you ever encountered a situation where you're working with an API that seems to put the Calendar Availabilities for a specific day into an array with that date? When you place the initial call, you add a query for the date you're interested in. The response array name varies based on the date requested. This can be quite a challenge when trying to target it.
For instance, you might have tried manually building the variable name as a string {{60.slots.‘2023-07-18’}} and even tried Set/Get Variable, but it just doesn't seem to work. Well, you're not alone. Many users have faced this issue and it can be quite frustrating.
Here's the Solution
The solution to this problem is simpler than you might think. All you need to do is use the “get()” function. Here's how you can do it:
{{get(60.slots; "2023-08-04")}}
That's it! It's as simple as that. This function will allow you to target the dynamic array name based on the date requested.
Troubleshooting Tips
If you're still having trouble, make sure you're entering the correct date in the function. Also, ensure that the array name is correct. If you're still facing issues, try reaching out to the API provider for further assistance.
Conclusion
Working with dynamic array names can be a challenge, especially when the array name varies based on the date requested. However, with the right approach and the use of the “get()” function, you can easily overcome this challenge. Remember, the key is to keep trying and never give up!
You do have further questions?
Ask your question via E-Mail: Richard@make-app.de
Book a paid Support & Consulting Session
New Make.com user? Sign up through this Affiliate Link to receive 10.000 operations for FREE.