get_data function now returns a list of dictionaries, instead of list of tuples