Get the number of keys of the dict?

Valery_Kondakoff's icon

Hello!

What is the easiest way to get the number of keys of the dict (for further sequential reading through the dict)?
I was trying to use [getkeys] message, which is outputting list of keys and then count the list length using [zl len], but the dict is rather lengthy and the number of the keys exceeds 256, so [sz len] does not work.

Any suggestions?
Thank you!

Mark's icon

if i recall correctly, [zl len] has a default limit of 256 but you can change that by adding the desired limit as an argument? not sure though, so check the help file

Valery_Kondakoff's icon

Ah, yes, thank you! I was sure, this is a hardcoded limit, so was not very careful when searching the docs. [zl len @zlmaxsize 4096] works great. Thanks again, Mark!