Recursive display
Closed this issue · 0 comments
uzimaru0000 commented
I want to be able to recursively display when an array or object comes into a field.
The image is as below.
$ cat test.json | tv
+-------+-------+-------------------------+--+------------------------+---------------------+----------------+-------------+
|address|company|email |id|name |phone |username |website |
+-------+-------+-------------------------+--+------------------------+---------------------+----------------+-------------+
|... |... |Sincere@april.biz |1 |Leanne Graham |1-770-736-8031 x56442|Bret |hildegard.org|
|... |... |Shanna@melissa.tv |2 |Ervin Howell |010-692-6593 x09125 |Antonette |anastasia.net|
|... |... |Nathan@yesenia.net |3 |Clementine Bauch |1-463-123-4447 |Samantha |ramiro.info |
|... |... |Julianne.OConner@kory.org|4 |Patricia Lebsack |493-170-9623 x156 |Karianne |kale.biz |
|... |... |Lucio_Hettinger@annie.ca |5 |Chelsey Dietrich |(254)954-1289 |Kamren |demarco.info |
|... |... |Karley_Dach@jasper.info |6 |Mrs. Dennis Schulist |1-477-935-8478 x6430 |Leopoldo_Corkery|ola.org |
|... |... |Telly.Hoeger@billy.biz |7 |Kurtis Weissnat |210.067.6132 |Elwyn.Skiles |elvis.io |
|... |... |Sherwood@rosamond.me |8 |Nicholas Runolfsdottir V|586.493.6943 x140 |Maxime_Nienow |jacynthe.com |
|... |... |Chaim_McDermott@dana.io |9 |Glenna Reichert |(775)976-6794 x41206 |Delphine |conrad.com |
|... |... |Rey.Padberg@karina.biz |10|Clementina DuBuque |024-648-3804 |Moriah.Stanton |ambrose.net |
+-------+-------+-------------------------+--+------------------------+---------------------+----------------+-------------+
$ cat test.json | tv -r id
+-------+-------+-------------------------+--+------------------------+---------------------+----------------+-------------+
|address|company|email |id|name |phone |username |website |
+-------+-------+-------------------------+--+------------------------+---------------------+----------------+-------------+
|... |... |Sincere@april.biz |1 |Leanne Graham |1-770-736-8031 x56442|Bret |hildegard.org|
|... |... |Shanna@melissa.tv |2 |Ervin Howell |010-692-6593 x09125 |Antonette |anastasia.net|
|... |... |Nathan@yesenia.net |3 |Clementine Bauch |1-463-123-4447 |Samantha |ramiro.info |
|... |... |Julianne.OConner@kory.org|4 |Patricia Lebsack |493-170-9623 x156 |Karianne |kale.biz |
|... |... |Lucio_Hettinger@annie.ca |5 |Chelsey Dietrich |(254)954-1289 |Kamren |demarco.info |
|... |... |Karley_Dach@jasper.info |6 |Mrs. Dennis Schulist |1-477-935-8478 x6430 |Leopoldo_Corkery|ola.org |
|... |... |Telly.Hoeger@billy.biz |7 |Kurtis Weissnat |210.067.6132 |Elwyn.Skiles |elvis.io |
|... |... |Sherwood@rosamond.me |8 |Nicholas Runolfsdottir V|586.493.6943 x140 |Maxime_Nienow |jacynthe.com |
|... |... |Chaim_McDermott@dana.io |9 |Glenna Reichert |(775)976-6794 x41206 |Delphine |conrad.com |
|... |... |Rey.Padberg@karina.biz |10|Clementina DuBuque |024-648-3804 |Moriah.Stanton |ambrose.net |
+-------+-------+-------------------------+--+------------------------+---------------------+----------------+-------------+
# address
+--------------+--+-----------------+---------+----------+
|city |id|street |suite |zipcode |
+--------------+--+-----------------+---------+----------+
|Gwenborough | 1|Kulas Light |Apt. 556 |92998-3874|
|Wisokyburgh | 2|Victor Plains |Suite 879|90566-7771|
|McKenziehaven | 3|Douglas Extension|Suite 847|59590-4157|
|South Elvis | 4|Hoeger Mall |Apt. 692 |53919-4257|
|Roscoeview | 5|Skiles Walks |Suite 351|33263 |
|South Christy | 6|Norberto Crossing|Apt. 950 |23505-1337|
|Howemouth | 7|Rex Trail |Suite 280|58804-1099|
|Aliyaview | 8|Ellsworth Summit |Suite 729|45169 |
|Bartholomebury| 9|Dayna Park |Suite 449|76495-3109|
|Lebsackbury |10|Kattie Turnpike |Suite 198|31428-2261|
+--------------+--+-----------------+---------+----------+
Combines fields that are optionally keyed to the value received.