input: Write a python function to parse a JSON string and extract the inflation rate for a given year.
  assert get_inflation_rate('{"2017":2.2,"2018":2.4,"2019":1.7,"2020":0.1}', "2020") == 0.1
  assert get_inflation_rate('{"2017":2.2,"2018":2.4,"2019":1.7,"2020":0.1}', "2018") == 2.4
  assert get_inflation_rate('{"2017":2.2,"2018":2.4,"2019":1.7,"2020":0.1}', "2019") == 1.7
output: import json
  
  def get_inflation_rate(json_str, year):
      data = json.loads(json_str)
      return data[year]