import json


def get_json_keys_from_col(col):
    """Get keys from all json strings within a column
        Args:
            col(str): column name
        Returns:
            A list of keys from the dictionaries
            A list of indexes for which the element is not a dictionary
    """
    fields = set()
    col = col.apply(json.loads)
    col = col.dropna()
    not_dict_idx = []
    if len(col[0]) > 1:
        col = col.explode()
    for (i, row) in enumerate(col):
        try:
            fields = fields.union(set(row.keys()))
        except AttributeError:
            not_dict_idx.append(i)
    return list(fields), not_dict_idx