I read this dictionary from a file as a string:
string = '{"key1":"value1", "key2":"value2"}'
I don't know which values key1 and key2 can assume, I need to access the value of the last pair written on the string (in this case 'value2'). So converting it into a python dictionary is out of the question since it would probably change the order.
I've tried something like:
value = re.search(r'"(.*?)":"(.*?)"', string)
But I don't know how to access the .group(2) of the last match.