This is a very quick example of tables and nested in each table the columns and indexes that tables has.
select t.table_name, cursor(select column_name from user_tab_cols tc where tc.table_name = t.table_name) cols , cursor(select index_name from user_indexes i where i.table_name = t.table_name) indexes from user_tables t
The resulting JSON looks like this.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOXgUQjl9HUo7KQ5A9SPUseOQLLT728ZTygqnwATG9k_MDV42-6qc78F9Epz4kPKOW_sITavKFmH4qmr_V1mBZXgfRvYyRuXxd8GV6CKpl1290gJVW-zDDZw1uHUGHvSXlQTHf/s1600/Screen+Shot+2013-09-27+at+12.53.07+PM.png)