Hmm, no. You rewrite it as
key1 = foo/bar
key2 = baz/bat
a[key1] = b[key2]
if (a[key1] == c)
I'm sure a coder who understands the context can come up with better names than key1 and key2.edit: or better yet
key2 = baz/bat
normal_var = b[key2]
if (normal_var == c)
...
key1 = foo/bar
a[key1] = normal_var