split/combine as table
Posted: Tue Jul 02, 2013 6:00 am
Not sure on the best syntax here but what I'd like is something like this:
I'm using item for secondaryDelimiter and line for primaryDelimiter in my discussion for clarity...
What this would do is take the first line and use its items as keys in the second dimension of the array and for then each subsequent line would have an array index starting from 1. So the data:
once split would be accessible as:
A possibly better alternative might be:
Here if no keyList is supplied then the multi-dimensional array would have a numbered array as the second dimension...
Anyone have any thoughts in this?
Code: Select all
split variable {by|with|using} primaryDelimiter and secondaryDelimiter as table
What this would do is take the first line and use its items as keys in the second dimension of the array and for then each subsequent line would have an array index starting from 1. So the data:
Code: Select all
Greeting,Planet
Hello,Earth
Hello,Saturn
Code: Select all
theVariable[2]["Planet"] = "Saturn"
Code: Select all
split variable {by|with|using} primaryDelimiter and secondaryDelimiter as table [with keys keyList]
Anyone have any thoughts in this?