Add array support to JSON implementation
Closed this issue · 1 comments
tabularelf commented
Been considering supporting this
{
"greetings": [
"Hi!",
"Howdy!",
"How do you do?"
]
}
---> "greetings0"
, "greetings1"
, "greetings2"
tabularelf commented
I might also provide a helper function that can pull out all of the entries that were fed from an array.
lexicon_entry_get_variations("greetings")
--> ["greetings0", "greetings1", "greetings2"]
Will also work for entries that contain a struct within a struct with an array.
{
"test": {
"array": [
"nice",
"very nice"
]
}
}
lexicon_entry_get_variations("test.array")
--> ["test.array0", "test.array1", "test.array2"]