is there way to fetch only certain data through urlfetch?

Asked Aug 12, 2021·2 replies·Last activity 5 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

http://hangang.dkserver.wo.tc

that's the site and it seems json something which I don't really know and couldn't find a way to get only certain data which is temp and time the number part is there a way to make command on nightbot?

for instance: I like to see result as "It's 28.0 degree monitored in 2021-08-12 07:30:03"

2 replies

Hiya, something like this should work:

$(eval const api = $(urlfetch json http://hangang.dkserver.wo.tc); `It's ${api.temp} degree monitored at ${api.time}`)

Thank you so much for helping me out! it works like charm!