A worked example, rendered from real sample data. Sign in to run the tool on your own input.
const users=await fetch("/api/users").then(r=>r.json());const active=users.filter(u=>u.active).map(u=>({id:u.id,name:u.name}));const users = await fetch("/api/users").then(r => r.json());
const active = users.filter(u => u.active).map(u => ({
id: u.id,
name: u.name
}));
Pretty print JavaScript with syntax highlighting. Part of the DevTools Surf developer suite. Browse more tools in the JavaScript collection.