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: