Paste JSON and get keys sorted alphabetically at every level.
} catch (e) {
el.innerHTML = <div style="padding:1em;background:#fef2f2;border:1px solid #fca5a5;border-radius:6px;color:#dc2626;">β ${e.message}</div>;
}
}
When to use this
- Comparing two JSON configs β sort both, then diff
- Cleaning up package.json or tsconfig.json
- Making API responses consistent for snapshot testing
- Sorting i18n translation files