Sort them using a tuple as a key like this:
tempdata['logs'] = sorted(tempdata['logs'],
key=lambda k: (k['starttime'], k['time']))
Tuples are compared by each element in order.
And as a side note, this way the values are compared as strings, not as numbers. Don't know if that's relevant for you.