Check_Point
156-521 · Question #161
Which of the following allows jq to extract all names of access-layer rules from nested JSON data?
The correct answer is B. jq '.rulebase[].name'. When working with nested JSON where rules are stored in a "rulebase" array, jq '.rulebase[].name' accesses the "name" field of each rule entry, simplifying analysis and reporting.
Check Point API Fundamentals
Question
Which of the following allows jq to extract all names of access-layer rules from nested JSON data?
Options
- Ajq '.access-layer.name'
- Bjq '.rulebase[].name'
- Cjq '.rules[].uid'
- Djq '.access-layer[].name'
How the community answered
(28 responses)- A4% (1)
- B79% (22)
- C14% (4)
- D4% (1)
Explanation
When working with nested JSON where rules are stored in a "rulebase" array, jq '.rulebase[].name' accesses the "name" field of each rule entry, simplifying analysis and reporting.
Topics
#jq#JSON parsing#nested arrays#rulebase filtering
Community Discussion
No community discussion yet for this question.