How do I reference an interface by name in ash

I feel like this is such a noob question but maybe it'll be of benefit to others.

I've made interface names(.ifname) for my guest networks but I don't know how to use that name in a script using uci. For example;

12:45 ~ # uci show wireless | grep guest

The reason I need to reference them is because I toggle them on/off using the WPS button. I thought it'd be something like this;

# uci get wireless.@guest2.disabled

Instead i get;

13:02 ~ # uci get wireless.@guest2.disabled
uci: Invalid argument

I've even tried;

13:09 ~ # uci get @guest2.disabled
uci: Entry not found

I have a rough feeling that it's SUPER simple but please and thank you for your help in advance.

Unfortunately there is no super simple way in the shell API for this. You could resort to ubus calls though:

eval $(ubus call uci get '{ "config": "wireless", "type": "wifi-iface", "match": { "ssid": "guest2" } }' | jsonfilter -e 'disabled=@.values[*].disabled')
[ "$disabled" = 1 ] && disabled=0 || disabled=1
ubus call uci set '{ "config": "wireless", "type": "wifi-iface", "match": { "ssid": "guest2" }, "values": { "disabled": "'$disabled'" } }'
ubus call network reload

WOW that's a lot to understand and maybe can be of help when I wrap my brain around it but in the mean time I should just stick with;

# uci get wireless.wifinetx.etc

and keep in mind the wifinet numbers.
ahh sad face,
but thank you!!