vs acoss a list or equivilent

vs[": ";“foo: bar”]“foo”“bar"I am looking to create a table from lists of data but in certaincolumns I only want to take specific data from each line.In the example above where I have “foo: bar”, I only want “bar” so Iuse vs[”: “;“foo: bar”][1];However I want to apply this to lists as I insert into a table, atpresent the only way I can do this is to edit the list first likethis, (vs[”: ";] each (“foo: bar”;“foo: bar”;“foo: bar”))[;1], andthen insert into the table however I’m looking for better way of doingthis. Any ideas?Thanks

q)a:(“foo: bar”;“foo: bar”;“foo: bar”)vs across a list: q)": "vs/:a “foo” “bar” “foo” “bar” “foo” “bar"Indexing at depth for the 'bar’s q)vs/:[”: ";a][;1] “bar” “bar” "bar"Not fully sure what you mean by> However I want to apply this to lists as I insert into a table, at> present the only way I can do this is to edit the list first like> thisBut hazarding a guess, if you have lists like this: q)show l:flip((“firstColRow1”;“firstColRow2”;“firstColRow3”);a;(“lastColRow1”;“lastColRow2”;“lastColRow3”)) “firstColRow1” “foo: bar” “lastColRow1” “firstColRow2” “foo: bar” “lastColRow2” “firstColRow3” “foo: bar” “lastColRow3"You can do something like this: q)f:{vs/:[”: ";x][;1]} q)flip AB`C!(::;f;::)@'flip l A B C ---------------------------------- “firstColRow1” “bar” “lastColRow1” “firstColRow2” “bar” “lastColRow2” “firstColRow3” “bar” “lastColRow3"Mohammad NoorOn Apr 11, 10:42?am, Conor <omearaco…> wrote:> vs[”: “;“foo: bar”]> “foo”> “bar”>> I am looking to create a table from lists of data but in certain> columns I only want to take specific data from each line.>> In the example above where I have “foo: bar”, I only want “bar” so I> use vs[”: “;“foo: bar”][1];>> However I want to apply this to lists as I insert into a table, at> present the only way I can do this is to edit the list first like> this, (vs[”: ";] each (“foo: bar”;“foo: bar”;“foo: bar”))[;1], and> then insert into the table however I’m looking for better way of doing> this. Any ideas?>> Thanks</omearaco…>

ThanksOn Apr 11, 12:20?pm, Mohammad Noor <mdsa…> wrote:> ? ? ? ? q)a:(“foo: bar”;“foo: bar”;“foo: bar”)>> vs across a list:> ? ? ? ? q)": “vs/:a> ? ? ? ? “foo” “bar”> ? ? ? ? “foo” “bar”> ? ? ? ? “foo” “bar”>> Indexing at depth for the 'bar’s> ? ? ? ? q)vs/:[”: “;a][;1]> ? ? ? ? “bar”> ? ? ? ? “bar”> ? ? ? ? “bar”>> Not fully sure what you mean by>> > However I want to apply this to lists as I insert into a table, at> > present the only way I can do this is to edit the list first like> > this>> But hazarding a guess, if you have lists like this:> ? ? ? ? q)show l:flip((“firstColRow1”;“firstColRow2”;“firstColRow3”);a;> (“lastColRow1”;“lastColRow2”;“lastColRow3”))> ? ? ? ? “firstColRow1” “foo: bar” “lastColRow1”> ? ? ? ? “firstColRow2” “foo: bar” “lastColRow2”> ? ? ? ? “firstColRow3” “foo: bar” “lastColRow3”>> You can do something like this:> ? ? ? ? q)f:{vs/:[”: “;x][;1]}> ? ? ? ? q)flip AB`C!(::;f;::)@'flip l> ? ? ? ? A ? ? ? ? ? ? ?B ? ? C> ? ? ? ? ----------------------------------> ? ? ? ? “firstColRow1” “bar” “lastColRow1”> ? ? ? ? “firstColRow2” “bar” “lastColRow2”> ? ? ? ? “firstColRow3” “bar” “lastColRow3”>> Mohammad Noor>> On Apr 11, 10:42?am, Conor <omearaco…> wrote:>>>> > vs[”: “;“foo: bar”]> > “foo”> > “bar”>> > I am looking to create a table from lists of data but in certain> > columns I only want to take specific data from each line.>> > In the example above where I have “foo: bar”, I only want “bar” so I> > use vs[”: “;“foo: bar”][1];>> > However I want to apply this to lists as I insert into a table, at> > present the only way I can do this is to edit the list first like> > this, (vs[”: ";] each (“foo: bar”;“foo: bar”;“foo: bar”))[;1], and> > then insert into the table however I’m looking for better way of doing> > this. Any ideas?>> > Thanks- Hide quoted text ->> - Show quoted text -</omearaco…></mdsa…>