I am not sure I understand 100% what you want, but consider this example:

(NeoCSVReader on: 'foo bar baz
1 2 3
11 22 33' readStream)
        separator: $ ;
        namedColumnsConfiguration;
        upToEnd.

=> an Array(a Dictionary(#bar->'2' #baz->'3' #foo->'1' ) a 
Dictionary(#bar->'22' #baz->'33' #foo->'11' ))

Since you did not use $, but space I had to set that using #separator:

#namedColumnsConfiguration uses the header as keys and reads dictionaries 
instead of arrays.

Instead of #upToEnd you can also iterate with #do:

Is this what you are looking for ?

> On 12 Sep 2017, at 08:23, Stephane Ducasse <stepharo.s...@gmail.com> wrote:
> 
> Hi sven
> 
> I have a question with NeoCVS
> Do you offer the possibility to manage the data of one line based on
> the description given by the first line
> 
> Ex
> 
> foo bar baz
> 1 2 3
> 11 22 33
> 
> =>
> 
> res doWith: [:tag :data |
>     Transcript show: tag ; space ; show: data printString ;cr
> ]
> 
> foo 1 bar 2 baz 3
> foo 11 bar 22 baz 33
> 
> Stef
> 


Reply via email to