Nik_Dev,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
</head>
<body>
<div id="out"></div>
<script>function success(data){
data = data.find(e => e.ccy == "EUR" && e.base_ccy == "UAH");
document.querySelector("#out").innerHTML = `Евро к гривне <br>Покупка: ${data.buy}<br>Продажа: ${data.sale}`
}</script>
<script src="https://api.privatbank.ua/p24api/pubinfo?jsonp=success&exchange&coursid=5"></script>
</body>
</html>