JSON to TypeScript
Turn a response into an interface, merging types across an array so varying keys become optional.
Runs entirely in your browser. Nothing you type or paste is sent anywhere.
Declare as
Nested objects
Paste a whole array and the types merge across it: a key some elements lack becomes optional, and one whose type varies becomes a union.
TypeScript