better-align
better-align copied to clipboard
Align properties across objects (table-like)
Is there a way to align properties across objects (same properties) to reach a table-like result, as follows?
const arrOfObj = [
{ propA: "first element", propB: "value one", propC: "a" },
{ propA: "second element longer", propB: "value two", propC: "bee" },
{ propA: "third element", propB: "value three is the longest", propC: "see they're aligned" },
];