input: Write a python function to extract multiple parameters from a URL and return them in a JSON format.
  assert extract_params('/multiple_params?name=John&age=30&city=NewYork') == {'name': 'John', 'age': '30', 'city': 'NewYork'}
  assert extract_params('/multiple_params?name=Jane&age=25&city=LosAngeles') == {'name': 'Jane', 'age': '25', 'city': 'LosAngeles'}
  assert extract_params('/multiple_params?name=Alice&age=22&city=Chicago') == {'name': 'Alice', 'age': '22', 'city': 'Chicago'}
output: def extract_params(url):
      from urllib.parse import urlparse, parse_qs
      query = urlparse(url).query
      params = parse_qs(query)
      return {k: v[0] for k, v in params.items()}