Currency converter with combined output

Hello,

Here is the result that I would like to make

x HUF = y USD = z EUR = k AUD

What I have tried:
$(urlfetch https://decapi.me/misc/currency?value=$(1)&from=HUF&to=USD)
$(urlfetch https://decapi.me/misc/currency?value=$(1)&from=HUF&to=EUR)
$(urlfetch https://decapi.me/misc/currency?value=$(1)&from=HUF&to=AUD)
which gives:

x HUF = y USD x HUF = z EUR x HUF = k AUD

Can anyone help me?

thank you

Hey @nomoresquirrel!

This should do what you’re looking for:

$(eval c = s => s.replace(/\d+\sHUF\s/, ''); u = '$(urlfetch https://decapi.me/misc/currency?value=$(1)&from=HUF&to=USD)'; e = c('$(urlfetch https://decapi.me/misc/currency?value=$(1)&from=HUF&to=EUR)'); a = c('$(urlfetch https://decapi.me/misc/currency?value=$(1)&from=HUF&to=AUD)'); `${u} ${e} ${a}`;)
1 Like

thank you thank you very much

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.