Zet - How do I use find to exec where the file is found?

How do I use find to exec where the file is found?

You can use -execdir

Example. Find the package.jsons and run npm install in their path

find -type f -name package.json -execdir npm install \;

#find #bash