• This function converts an array of strings into an array of objects representing .trc data.

    Parameters

    • unprocessedData: string[]

      Array of strings, where each string is a comma-separated representation of a row of data.

    Returns object[]

    Array of objects, where each object represents a row of data from the .trc file.

    Remarks

    This function takes an array of strings (representing rows of .trc data) as input. It reads the lines to determine if it includes headers (prefixed with '*'). If headers are found, they are extracted and used as the keys for the resulting objects. If not, default headers are used.

    The function then iterates through each line of data by using the function ProcessLines, splitting it into separate elements based on the comma delimiter, and creating an object from these elements with the corresponding headers as keys.

    Example

    const unprocessedData = [ "* Column1,Column2", "Value1,Value2", "Value3,Value4" ];
    const result = ExtractTraceData(unprocessedData);
    // result = [
    // { "Column1": "Value1", "Column2": "Value2" },
    // { "Column1": "Value3", "Column2": "Value4" },
    // ];

Generated using TypeDoc