import json


def process_geojson(in_file):
    """Read in geojson spatial data and add in a feature level id.

    :param in_file:                 Full path with file name and extension to the input geojson file
    :type in_file:                  str

    :return:                        geojson array

    """

    # Open file and load data
    with open(in_file) as get:
        basin_features = json.load(get)

    # Add in basin_id
    for fx in basin_features['features']:
        fx['id'] = fx['properties']['basin_id']

    return basin_features