nerdexam
Check_Point

156-521 · Question #164

What is a best practice when combining mgmt_cli --format json and jq in production scripts?

The correct answer is B. Parse JSON inline using jq and extract only needed fields. Best practice is to use jq inline to extract only necessary fields (like UID, name, IP) to reduce complexity, improve script clarity, and avoid handling unnecessary output.

Use Cases and Best Practices for Automation

Question

What is a best practice when combining mgmt_cli --format json and jq in production scripts?

Options

  • ALog raw JSON and filter later
  • BParse JSON inline using jq and extract only needed fields
  • CUse jq after converting JSON to CSV
  • DAvoid jq due to security risks

How the community answered

(33 responses)
  • A
    3% (1)
  • B
    73% (24)
  • C
    6% (2)
  • D
    18% (6)

Explanation

Best practice is to use jq inline to extract only necessary fields (like UID, name, IP) to reduce complexity, improve script clarity, and avoid handling unnecessary output.

Topics

#mgmt_cli#jq#JSON filtering#production scripting

Community Discussion

No community discussion yet for this question.

Full 156-521 Practice