How do I convert an input name array to dot notation, similar to the way the validator handles keys? I'd like it to work for non-arrays as well.
For example, say I have:
$input_name_1 = 'city';
$input_name_2 = 'locations[address][distance]';
How would I convert that to:
$input_dot_1 = 'city';
$input_dot_2 = 'locations.address.distance';