input: Write a python function to extract features from a JSON string.
  assert feature_extraction('{"id": 1, "title": "Hello World", "body": "This is a test body."}') == {"id": 1, "title": "Hello World", "body_len": 20}
  assert feature_extraction('{"id": 2, "title": "Another Title", "body": "Another body text."}') == {"id": 2, "title": "Another Title", "body_len": 18}
  assert feature_extraction('{"id": 3, "title": "Title Here", "body": ""}') == {"id": 3, "title": "Title Here", "body_len": 0}
output: import json
  
  def feature_extraction(json_str):
      data = json.loads(json_str)
      body_len = len(data['body'])
      return {
          "id": data["id"],
          "title": data["title"],
          "body_len": body_len
      }