antonmedv / fx

Terminal JSON viewer & processor
https://fx.wtf
MIT License
19.08k stars 438 forks source link

fx with cli-table3 -- column missing #163

Closed xiang-jun closed 2 years ago

xiang-jun commented 3 years ago

Example JSON (example.json):

[
    {
        "index": 1,
        "name": "Brian Vaughn",
        "email": "bvaughn@fb.com",
        "date": "2021-05-07T13:10:50Z"
    },
    {
        "index": 2,
        "name": "Brian Vaughn",
        "email": "bvaughn@fb.com",
        "date": "2021-05-07T12:53:39Z"
    }
]

With the following command: fx example.json table, got the following:

┌───────┬──────────────┬────────────────┬──────────────────────┐
│ index │ name         │ email          │ date                 │
├───────┼──────────────┼────────────────┼──────────────────────┤
│       │ Brian Vaughn │ bvaughn@fb.com │ 2021-05-07T13:10:50Z │
├───────┼──────────────┼────────────────┼──────────────────────┤
│       │ Brian Vaughn │ bvaughn@fb.com │ 2021-05-07T12:53:39Z │
└───────┴──────────────┴────────────────┴──────────────────────┘

The information on the index column is missing. The table was set up by following instructions in https://medium.com/@antonmedv/discover-how-to-use-fx-effectively-668845d2a4ea

Running cli-table3 directly on the JSON data gives expected results.

Thanks,

Xiang-Jun

antonmedv commented 2 years ago

I rewrote the entire fx in golang. So I belove this issue is no longer needed.