any negative reason why not to use for loop to do that?
also, I want to later do some calculation and append value to the associative array. Then turn the associative array into table. Below is the example how I do it. the aa's value is correct with {{}, {}, {"3", "2"}, {"A", "b"}}, but the table created only has value in :rain. I think it is because jmp default column data type is numeric+continous.
1) is there a better/faster way or forcing way to turn associative array into a table without the need of defining column data type?
keys = aa << get keys;
check= {"col_today", "col_rain"};
col_today = {"A", "b"};
col_rain = {"3","2"};
for (j=1, j<=nitems(check), j++,
for (i=1, i<=nitems(keys), i++,
if(word(-1, check[j], "_") == keys[i],
aa << Insert(keys[i],eval(parse(check[j])));
);
);
);
values1 = aa << get values;
tb = new table();
for (i = 1, i <= nitems(keys), i++,
tb << new column(char(keys[i]), , set values(values1[i]));
)
missing :today value because it is character