I'm facing a challenge with passing the markersArray to the callback function in order to push the results into the relevant array. The issue arises when trying to request nearby amenities for each filter and store them in separate arrays as per the comments in the code.
Despite numerous attempts, I haven't been able to find a solution yet.
Any help or suggestions would be greatly appreciated.
Edit: To clarify, I need to iterate through the filters 4 times and collect the results in 4 different arrays.