What is the preferred method for testing the existence of a key in an associative array?
I use the in operator:
if(key in aa) {
there
}
if(key !in aa) { not there}
You can also fetch the pointer right there too:
if(auto pvalue = key in aa) {
auto value = *pvalue;
// go ahead and use it
}
