Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertJSONToTable ¶
func ConvertJSONToTable(columnPathMappingPrefix string, columnPathMapping map[string]string, sourceData interface{}) ([]map[string]interface{}, error)
ConvertJSONToTable extracts data from a JSON or struct object using specified paths.
columnPathMappingPrefix: Points to a specific location in the JSON or struct object from where extraction should begin. If left empty, extraction will start from the root of the object.
columnPathMapping: A map where each key represents the desired column name in the output table, and each value represents a gabs path to extract the data within the given JSON or struct.
sourceData: JSON or struct from which data extraction should take place.
Returns a slice of maps. Each map represents a row in the table, with each key-value pair in the map being equivalent to a column name and its value.
Types ¶
This section is empty.