Check_Point
156-521 · Question #152
After adding a host using mgmt_cli --format json, how would you extract only the name field using jq?
The correct answer is B. jq '.name'. When mgmt_cli returns the output with --format json, the resulting JSON includes "name" at the top level. Running jq '.name' extracts just the value of that field.
Check Point API Fundamentals
Question
After adding a host using mgmt_cli --format json, how would you extract only the name field using jq?
Options
- Ajq '.host'
- Bjq '.name'
- Cjq 'name'
- Djq '.object.name'
How the community answered
(47 responses)- B94% (44)
- C4% (2)
- D2% (1)
Explanation
When mgmt_cli returns the output with --format json, the resulting JSON includes "name" at the top level. Running jq '.name' extracts just the value of that field.
Topics
#jq#name field#mgmt_cli#JSON extraction
Community Discussion
No community discussion yet for this question.