try to do it with grep here is a sample with vdom test show
full-configuration system interface | grep 'set vdom "test"' -B1edit
"ssl.test"set vdom "test"--edit "port36.898"set vdom "test"--edit
"port38.899"set vdom "test"--edit "lo_test_01"set vdom ...