Text;
                var locations = JSON.parse(text);
                var mainElement = document.getElementById("destinationLocation");
                mainElement.innerHTML = "";
                locations.forEach(element => {
                    mainElement.innerHTML = mainElement.innerHTML
                        + '<option value="' + element.code + '">' + element.name + '</option>';
                });
            }
        });
    </script>
</body>

</html>