StringArray and ValueTrees

I’ve seen similar posts but nothing that answers my question.
I’m trying to store a small StringArray in a Value tree.

Putting the StringArray into the tree is easy:
pedalData.setProperty(cntgPropertyTags, newPresetTags, nullptr);
(where newPresetTags is a juce::stringArray)

But how do I get it out again?

If I do this:
pedalData[property].getArray()

I get an array of variants. There must be an easier way of going through each variant in the array, converting it to a juce::String and then adding it to an empty String Array?

I guess you will have to iterate over the returned array one or the other way.
It could have been implemented as an operator juce::StringArray(const juce::var&), but it doesn’t exist.
It can be written as a free function quite easily:

static inline juce::StringArray toStringArray (const juce::var& in)
{
    juce::StringArray array;

    if (auto* varArray = in.toArray())
        for (const auto& item : *varArray)
            array.add (item.toString());

    return array;
}

There are alternative ways to write it using std::transform or std::back_inserter. They reduce the LOC minimally, so I leave that up to you.