I think "keys" is a bad name for the parameter, because it makes me feel that it's possible to get more than one attribute, while, if I understand it right, we can only get one attribute (with a path to this attribute, containing multiple "keys"). Path would likely be a better name.

Btw the whole function is called "attributes", shouldn't it be named "attribute"?