If you want to keep the types, you need some sort of wrapper object to hold 
them. Json is pretty good at that:
    
    
    import json
    let
      numberList = [1, 2, 3]
      letterList = ["a", "b", "c"]
    var
      finalList = newJArray()
    for i in 0 ..< numberList.len:
      finalList.add(newJInt(numberList[i]))
      finalList.add(newJString(letterList[i]))
    echo finalList
    
    
    Run

Reply via email to