How to display elements of JSON array in the select (each item in a separate option)?

Pull data from JSON, which is based a few dates.
Server returns the date object:(5) ["09.10.2017", "10.10.2017", "11.10.2017", "12.10.2017", "13.10.2017"]
How to translate the object back to the array and each date put in a separate option in the html select element?

JSON:
{
 "date": [
"09.10.2017",
"10.10.2017",
"11.10.2017",
"12.10.2017",
"13.10.2017"
]
}


Javascript:
var DONE = 4
var OK = 200
function sendAjax () {
 var xhr = new XMLHttpRequest()
 xhr.open('GET', 'js/date.json', true)
 xhr.onreadystatechange = function () {
 if (xhr.readyState === DONE && xhr.status === OK) {
console.log(JSON.parse(xhr.responseText))
}
}
 xhr.send()


HTML:
<select class="table__select" onclick="sendAjax()"></select>
June 14th 19 at 18:14
2 answers
June 14th 19 at 18:16
Solution
Yes, thank you very much
now you need to understand how and why it worked ) because it is a es6, and I'm still with the old did not understand how you can understand the question - Jacquelyn_Pfeff commented on June 14th 19 at 18:19
June 14th 19 at 18:18
Array.prototype.map

Find more questions by tags ArraysJavaScriptJSON