transformKey method, array to dot notation