I guess I need to add some explanation, that I want to ask this question, because too short question doesn\'t quality standards... funny...
So, here is the question: How
If you know all the points of your path, I believe a more performant solution than stepping through the path might be to search the d
attribute of your path for the specific x coordinate you are looking for. Then capture the y coordinate using regexp. The regexp could be used like so:
const regex = new RegExp(`${x} ((\d*.\d*))`)
const match = regex.exec(d)