I have a variable that contains a list of strings. For each string in the list I would like to create a new dictionary, then update each dictionary with that string value. This would result in 100 new dictionaries being created. For example my variable looks similar to this...
q)stock
"APPL"
"TSLA"
"AMZN"
"MSFT"
"NVDA"
..
q)count stock
100
I know how to do this for a single string in a variable...
q)newdict:()!()
q)stock:"AAPL"
q)newdict[`ticker]:stock
q)newdict
ticker|"AAPL"
But how would I do this for a variable that is a list of 100 strings? Also, if I wanted to update the dictionary to include additional key:value pairs from another variable with the same count (like below) what is the correct syntax to use for this operation?
q)date
2019.05.23T13:03:55.271474000 2019.05.23T13:03:55.271474000...
q)count date
100
Expected output for each string in variable would create a new dictionary similar to the following...
q)newdictAPPL
ticker|"APPL"
datetime|2019.05.23T13:03:55.271474000
q)newdictTSLA
ticker|"TSLA"
datetime|2019.05.23T13:05:33.727845200
q)newdictAMZN
ticker|"AMZN"
datetime|2019.05.23T13:08:27.742968000
stockvariable contains 100 strings, not 100 characters (a string is a list of characters)