0
0
Azurecloud~10 mins

Output formats (json, table, tsv) in Azure - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - Output formats (json, table, tsv)
Start Command
Select Output Format
Format Data
Display Output
End
The command starts, you choose an output format (json, table, or tsv), data is formatted accordingly, then displayed.
Execution Sample
Azure
az vm list --output json
az vm list --output table
az vm list --output tsv
These commands list virtual machines in Azure with output in JSON, table, or TSV formats.
Process Table
StepCommandOutput Format SelectedData FormattingOutput Example
1az vm list --output jsonjsonData structured as JSON objects{"name": "vm1", "location": "eastus"}
2az vm list --output tabletableData formatted into columns and rowsName Location vm1 eastus
3az vm list --output tsvtsvData formatted as tab-separated valuesvm1 eastus
4EndN/AOutput displayed to userOutput shown in chosen format
💡 All commands complete after displaying output in the selected format.
Status Tracker
VariableStartAfter jsonAfter tableAfter tsvFinal
output_formatnonejsontabletsvtsv
formatted_datanoneJSON objectTable stringTSV stringTSV string
Key Moments - 2 Insights
Why does the output look different when I change the format?
Because each format structures data differently: JSON uses nested objects, table uses columns and rows, and TSV uses tabs to separate values, as shown in execution_table rows 1-3.
Can I use these formats for automation?
Yes, JSON and TSV are easier for scripts to parse, while table is better for human reading, as seen in the output examples in execution_table.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what output format is used in step 2?
Ajson
Btable
Ctsv
Dxml
💡 Hint
Check the 'Output Format Selected' column in execution_table row 2.
At which step is data formatted as tab-separated values?
AStep 1
BStep 2
CStep 3
DStep 4
💡 Hint
Look at the 'Data Formatting' column in execution_table.
If you want output easy for scripts to read, which format should you choose?
Ajson
Bplain text
Ctable
Dnone
💡 Hint
Refer to key_moments about automation and execution_table output examples.
Concept Snapshot
Azure CLI output formats:
- json: structured data, good for automation
- table: human-readable columns
- tsv: tab-separated, easy for scripts
Use --output or -o flag to select format
Example: az vm list --output json
Full Transcript
This lesson shows how Azure CLI commands can output data in different formats: JSON, table, or TSV. The command starts, you pick a format, the data is formatted accordingly, then shown. JSON outputs structured data good for automation. Table outputs columns and rows for easy reading. TSV outputs tab-separated values for scripts. Examples include 'az vm list --output json' and others. Understanding these helps you choose the best format for your needs.