Cli route list in json file/or text file oneliner

I would make my own nodejs script.
Call the function get the response back, then use JSON.parse to create a table formatted output or json file.