How to write a check for ip in VirtualParameters

Good afternoon, please tell me how to check for ip in virtualparametrs. I used the standard script from the genieacs docs for mac.

But at the output I get because the router transmits in 1.ExternalAddress.


How can I check for the subnet 192.168..?

Spin through the results and filter for the one that looks valid. In this case:

if(p.value[0] && p.value[0].startsWith('192.168')) {
  m = p.value[0];