How to convert a list of records to table in Power Query - A better way

When parsing JSON files in Power Query, there will most likely come a step that you'll need to convert a list of records to a table. Say you have a JSON document like the following.

[{"name": "Reza", "age": "20", "phone": "123456789"}, {"name": "John", "age": "22", "phone": "123123123"},{"name": "Marie", "age": "24", "phone": "345345345"}]

The above JSON document represents an array of objects. When parsed using Json.Document(#"Previous Step"), it would like like the following.

If you follow the online documents or find your way around using the toolbar, you would first convert it to a table which would only contain a single column and then you would expand that column that would result to a table will all the columns you need. The resulting query will look like the following.

Records = Json.FromDocument(#"Previous Step"),Table = Table.FromList(Records, Splitter.SplitByNothing(), null, null, ExtraValues.Error),Expanded = Table.ExpandRecordColumn(Table, "Column1", {"name", "age", "phone"})

If you are like me, you might be annoyed by that extra step. But, fear not, we are going to get rid of that. In fact there is function to directly convert a list of records to table. You don't even need to provide the column names if you don't need them.

Records = Json.FromDocument(#"Previous Step"),Table = Table.FromRecords(Records)

You can check out more info on the Table.FromRecords function.