List paths that end in scalar values.
Section: Paths and Deep Updates
Find all scalar paths
bash
bash
echo '{"user":{"name":"alice","roles":["admin","dev"]}}' | jq 'paths(scalars)'Explanation
Great for data profiling and flattening strategies.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Paths and Deep Updates