PHP find array key recursively

Today I had an issue where I needed to find a key in multidimensional array. It took trial and error ant some googling around, but this is what I found. <php function recursiveFind(array $haystack, $needle) { $iterator = new RecursiveArrayIterator($haystack); $recursive = new RecursiveIteratorIterator( $iterator, RecursiveIteratorIterator::SELF_FIRST ); foreach ($recursive…

NestJs Microservice exception handling

Microservices is this concept of breaking up a monolyth into a smaller pieces to make project more manageable. But todays tip is about how to handle errors in NestJs microservice architecture. For an example lets use Redis as a proxy between other microservices instead of letting each microservice talk to…