← Questions
Collapsible JSON viewer in React
0
I was asked this
No reports yet. Sign in to say where you were asked it.
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 official answer yet. Write yours on the right and run it.
Nothing published yet.
Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding
