def parse(l1, l2, l3, stats):
    """Parse JSON stats from dump1090

    Args:
        l1 (str): Level 1 name of JSON tree
        l2 (str): Level 2 name of JSON tree
        l3 (str): Level 3 name of JSON tree
        stats (str): JSON to parse

    Returns:
        int: Value of given stat
    """

    raw = int()

    if l2 in stats[l1]:
        if l3 is None:
            raw = stats[l1][l2]
        elif l3 in stats[l1][l2]:
            raw = stats[l1][l2][l3]
            # The current netdata API supports only integers, so multiply your float number by
            # 100 or 1000 and set the divider of the dimension to the same number.
    return raw or None