from pathlib import Path
from typing import Dict
from typing import Any
import json


def read_json(path: Path) -> Dict[str, Any]:
    """
    Function that reads a json file located at the provided path and returns
    a dictionary that maps the names of items to information about those items
    """
    f = open(path, "r")
    s = f.read()
    f.close()
    items = json.loads(s)
    output = {}
    for item in items:
        name = item.get("name")
        if name is None:
            continue
        output[name] = item
    return output