not sure what nesting you looking at here :
grep works with include and exclude :
(WLC-BB) >grep ?
include Include lines that match.
exclude Exclude lines that match.
grep include "AP Serial Number" "show ap config general AP-NAME"
grep include "MAC Address" "show ap config general AP-NAME”
grep include "IP Address" "show ap config general AP-NAME"
check below blog:
https://wifirambler.wordpress.com/2021/08/03/aireos-commands/