add pattern to json script