Collapsible JSON viewer in React
In an hour of React, pretty-print a JSON value (objects, arrays, strings, numbers) with indentation, and give every nested object and array a toggle that collapses it to a placeholder and expands it again. Build it as a recursive component, decide where the collapsed state lives, and handle empty objects and arrays.
No answer yet. Write the first one; the best answer gets endorsed.