Python no longer comes preinstalled with macOS. Though running any command against /usr/bin/python3 will make macOS prompt you about installing the Xcode Developer Tools (takes two clicks), which does get you Python.
Anyway, jq now ships with macOS Sequoia.
For older versions of macOS, using JavaScript for Automation is preinstalled and gets the job done with a bit more verbosity: