def convert_to_str_array(scanpaths):
    """
    Converts the dict-formatted scanpaths into an array of strings for similarity calculations. Even though an array is
    not good for searching scanpath by IDs (O(n) time), it provides an easy way to get the size, n-th element or index.
    From: [{'fixations': [['A', '150'], ['B', '750'], ['C', '300']], 'identifier': '02'}, ..]
    To: [{'raw_str': 'ABC', 'identifier': '02'}, {'raw_str': 'AC', 'identifier': '03'}, .. ]
     """

    scanpath_strs = []
    # Extract scanpaths as raw string sequences with identifiers
    for act_scanpath in scanpaths:
        act_scanpath_str = ''
        for fixation in act_scanpath['fixations']:
            act_scanpath_str += fixation[0]
        # Store the identifier and extracted string sequence in an object
        temp_scanpath = {
            'identifier': act_scanpath['identifier'],
            'raw_str': act_scanpath_str
        }
        # Push the object to the array

        scanpath_strs.append(temp_scanpath)

    return scanpath_strs