added bracked notation support

See tests for examples. I split the parsing into a separate function(rather than just doing `string.split('.')`).