Converts row data (in JSON/associative array format) to tree structure based on column naming conventions.