from typing import Union
import json


def ask_json() -> Union[dict, list]:
    """
    Ask user a path to JSON file to navigate it.
    Return a JSON object from file entered by user.
    """

    print("Hello! This is JSON navigator. Please provide us with the path to .json file.")
    path = input("Please, enter a path to the file: ")

    with open(path, 'r') as infile:
        json_obj = json.load(infile)

    return json_obj