Urlfetch data on nightbot

I have this command

!addcom !text $(urlfetch json https://mysite.com/?=usd)
output of this is

how can I make it to just output the 21.36

Your only able to use $(urlfetch json) if the request returns valid JSON. The provided example isn’t valid JSON and can’t be parsed.


$(eval a=$(urlfetch json https://mysite.com/?=usd);a.value.dollar)

Thanks Aaron, what is the best way to achieve the output by just calling the urlfetch

thanks bud but this doesn’t work

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