foreach device in network.devices
foreach command in device.outputs.commands
where command.commandType == CommandType.NHRP_STATE
let response = parseConfigBlocks(device.platform.os, command.response)
foreach match in patternMatches(response, pattern)
This will allow you to define your pattern and match it against the command output.
Thanks - I had gotten misled by the lowercase commandType vs the uppercase C CommandType to call it in the data model.
The case is trying to be a difference between the lowercase position on the model tree and the upper case data type. Unfortunately it is confusing. If you hover over the commandType in “command.commandType” you will see a popup showing a yellow “CommandType” which indicates the data type. The data type is what you use on the right hand side of the ==.