This works on Mojave but likely works on some of the newer versions of OSX as well. Just run the below command in your terminal of choice:
sudo killall -HUP mDNSResponder
sudo is required since mDNSResponder runs as a separate user.
VS Code: OSX key repeating
Reducing JSON objects with JQ