Get original data index on event

Hi,
I would need to get the original array index of a selected point on a plot.
For instance if we consider the following data arrays:
x = [2,3,8,9,12]
y = [1,2,1,12,5]
and that I click on the point of coordinates (9,12), how to get the index from its original x and y arrays (here it would returns 3) in my myPlot.on('plotly_click', function(data){ } function ?

Thanks !