Sometimes I need the full Composer dependency name but I only know part of it. For example, I may know Block X-ray Attributes is a Composer dependency but I don’t remember the full package name. While I could open the composer.json file and find the dependency, I can also leverage jq to do the work for me.
I have composer.json files on two different branches and I want to compare their (non-dev) dependencies. This is the command I run to compare the “require” section of composer.json on my current branch to the “require” section of composer.json on another branch.