Using transform.Unmarshal to parse a CSV

Am trying to parse a CSV but I keep getting error about " wrong number of fields"? Can someone spot this newbie issue? Thanks


{{ with resources.GetRemote "https://archive.org/advancedsearch.php?q=collection%3AServantsOfKnowledge+(language%3Aori+OR+language%3A%22Oriya%22)&fl%5B%5D=collection&fl%5B%5D=addeddate&fl%5B%5D=description&fl%5B%5D=identifier&fl%5B%5D=title&fl%5B%5D=description&sort%5B%5D=&sort%5B%5D=&sort%5B%5D=&rows=2&page=1&output=csv" }}
  {{ warnf "%v" .Content}}
  {{ $csv := .Content | transform.Unmarshal (dict "delimiter" ",")}}
  {{ warnf "%v" $csv}}  
{{end}}


I get the same error on your file from a CSV validator: CSV Validator & Linter on Toolkit Bay

Thanks @regis for spotting that. Going to use JSON output of the remote server instead of CSV then.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.