input: Write a function to extract specific features from a JSON string. The function should return a dictionary containing the id, title, and the length of the body text.
  assert feature_extraction('{"id":111,"title":"This is a sample title","body":"This is a sample body text"}')=={"id": 111, "title": "This is a sample title", "body_len": 26}
  assert feature_extraction('{"id":222,"title":"Another title","body":"Short text"}')=={"id": 222, "title": "Another title", "body_len": 10}
  assert feature_extraction('{"id":333,"title":"","body":"Body with no title"}')=={"id": 333, "title": "", "body_len": 18}
  assert feature_extraction('{"id":444,"title":"Title with no body","body":""}')=={"id": 444, "title": "Title with no body", "body_len": 0}
  assert feature_extraction('{"id":555,"title":"Full info","body":"This is a longer body text that provides more details."}')=={"id": 555, "title": "Full info", "body_len": 50}
output: def feature_extraction(json_str):
      data = json.loads(json_str)
      return {"id": data["id"], "title": data["title"], "body_len": len(data["body"])}