def get_id_from_index(value, idx):
    """
    Finds datastore id of given value in id/value dictionary
    args:
        value: str, value to be searched
        inx: dict, dictionary of with ids as keys
    returns:
        did: int, datastore id of matching value
    """
    for k, v in idx.items():
        if v == value:
            return k