@stefan, thanks for your comment. It sets me thinking but I am not yet sure of 
the right way to proceed.

What I show on the right hand side of 
    
    
    var str_seq = @["10", "30", "40", "50", "80"]
    
    
    Run

is what I get from an echo of var str_seq. So this has more detail:

The actual code is like the following.
    
    
    var js_fkvals = parseJson(fkvals)
      echo "fkals = " &  $jsfkvals
      
      var js_fkvals_items:int = 0
      
      for i in items(js_fkvals):
        echo "i = " & $i
        inc(js_fkvals_items)
        
        var js_fkvals = parseJson(fkvals)
      echo "fkals = " &  $jsfkvals
      
      var js_fkvals_items:int = 0
      
      for i in items(js_fkvals):
        echo "i = " & $i
        inc(js_fkvals_items)
      
      # ...
      
      var str_ar:array[0..20,string]
      var str_ar_inc:int = 0
      for i in items(js_fkvals):
        str_ar[str_ar_inc] = $i
        inc(str_ar_inc)
      
      echo "str_ar[0] " & str_ar[0]
      echo "str_ar[1] " & str_ar[1]
    
    
    Run

The echo statements in the above code corrsponds to the following output when 
the code is run:
    
    
    output
    
    fkals = [[1,3,4,5,8],[10,30,40,50,80]]
    i = [1,3,4,5,8]
    i = [10,30,40,50,80]
    jsfkval_items = 2
    str_ar[0] [1,3,4,5,8]
    str_ar[1] [10,30,40,50,80]
    str_ar[str_ar_inc] = @["1", "3", "4", "5", "8"]
    
    
    
    Run

The last line here, 
    
    
    str_ar[str_ar_inc] = @["1", "3", "4", "5", "8"]
    
    
    Run

is what I am iterating over to get each string of the str_ar array.

Reply via email to