detailview working on the one object but i want to it works for array of objects or objects of objects
Most controls are optimized for straightforward simple JSON data, with the Detail View specifically designed for first-level nesting. Detail View is equipped to display first-level nested data in a tabular format. If you require a control capable of handling nesting across multiple levels (n level nesting), then JSON Viewer is the ideal choice for your specific scenario.
Please find the documentation link for JSON Viewer control below.
I hope this helps.