nerdexam
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)
  • A
    4% (1)
  • B
    79% (22)
  • C
    14% (4)
  • D
    4% (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.

Full 156-521 Practice