JSFiddle - React, Tailwind, and code Playground
JavaScript
$(function(){
array={};
array.gare= [ "g point1","g point2"];
array.hopital = [ "h point1","h point2"];
$('body').append($('<select/>').attr('id',"sel"));
$.each(array, function(key,val){
$('#sel').append($("<option/>").val(key).text(key).data('points',val));
})
$('#sel').on('change', function(){ console.log($(this).find(':selected').data('points'));
})
})