json_viewer
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Live example: https://stevekrouse-weatherdescription.web.val.run/
import { fetch } from "https://esm.town/v/std/fetch";
import { json_viewer } from "https://esm.town/v/stevekrouse/json_viewer";
export const weatherDescription = async (params: string[]): Promise<unknown> => {
let data = await fetch(`https://wttr.in/${params["city"]}?format=j1`);
let jsonData = await data.json();
return json_viewer(jsonData);
};
https://val.town/v/stevekrouse/weatherDescription
Thanks @mmcgrana (https://markmcgranaghan.com/) for the idea!
Migrated from folder: a0_forks/json_viewer