What would be the most efficient way to convert it to array of strings consisting only of values of Dict item “a”. (We can safely assume that each Dict in input array contains item “a”)
I mean to get a result (based on example above) like this:
Thank you both. With for loop (1st solution) it takes for me 0.042684 seconds (69.95 k allocations: 3.495 MiB). With getindex. it takes 0.000015 seconds (4 allocations: 192 bytes).
Good catch. The only thing left to say is that broadcast fails when any of the Dicts does not contain “a”. As long as that’s not the case, broadcasting is the best way
Edit: nvm, I just reread the question and he did say that all dicts do contain “a” here