How to get members of interface list

Hello everyone!
Please help me.
I have static address list name=WAN
I need to get members of address list WAN
I have two interfaces in the list WAN: ether1 and vlan interface “Internet”
I tried to get with command:

:local interfaces [/interface list member find list=WAN]

but I got like this: *23;*24

Please, help me, how to get members of interface list?
Thank you!

If you want to get the interface’s names you can do this:

:local interfaces [/interface list member find list=WAN];
:foreach interface in=$interfaces do={
	:put [/interface get $interface name]
}

In the code I only print them, but you can store the values in a second array or so.

Thank you for reply.
But very strange.
After command /interface list member find list=WAN I got answer *23;24.
If I manually in the terminal type, as example, :put [/interface get 24 name] I got empty answer. Without "" I got interface name, but this interface doesn’t have list “WAN”. Interface 23 is a cap interface, 24 is pptp interface.
Byt in my list WAN interface’s .id is: 0 and 16 without "
"

Did a bit of testing and I came up with this:

:foreach interface in=[/interface list member print as-value where list=WAN] do={:put ($interface->"interface")}

Wow!
It’s works!
Thank you very much!
I don’t know why mikrotik doesn’t make answer by default with “name” of interface on request /interface list member find list=WAN
Will be better to recieve name by default, not id of interface.
Thank you!
Have a great day!