The StringPairArray is a useful class, but I think it needs a few more functions.

I think there needs to be a way to iterate over all the keys and values, without using getAllKeys() and getAllValues().

For example:
const String getKey(int idx);
const String getValue(int idx);

Also, and easy to convert a string to a pair array and back, to make it easy to save it to settings. Or perhaps two strings, a string of keys and a string of values.


I could add that, but getAllKeys() returns a string array reference, so there’s no penalty in calling getAllKeys()[n].

But yes, some serialisation functions might be a nice addition.