...
Output may be sorted using jq or xq (part of yq).
For JSON : ... | jq 'walk( if type == "array" then sort else . end )'
For SAML : ... | xq -x 'walk( if type == "array" then sort else . end )'
On macOS, jq and xq may be installed using Homebrew brew install jq python-yq
or MacPorts.