To further elaborate on elclanrs answer, when accessing the key of an object. The keys are always strings. Id is a variable not a string.
Bracket notation works such that you need to put the quotes into the bracket when accessing the key. If not, it will look for a variable with the same name. Dot notation actually converts to bracket notation, and it looks like this,
time.id --> time["id"]
Therefore you cannot use variables with dot notation because it will surround the variable in quotes.
Hope that helped!