<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fetch_json_by_name(name):
 """ Fetch json based on the element name First gets the href based on a search by name, then makes a second query to obtain the element json :method: GET :param str name: element name :return: :py:class:`smc.api.web.SMCResult` """

    result = fetch_meta_by_name(name)
    if result.href:
        result = fetch_json_by_href(result.href)
    return result