Dear Jekyllers:
This topic does not seem to have been covered yet: So I’m reading in a data file (CSV, of scientific publications). When I look at the result with the debug filter, I see this:
–––––––––––––
Array
[{“Key”=>“BI7CA6N4”,
“Item Type”=>“journalArticle”,
“Publication Year”=>“2020”,
“Author”=>“xx; Bach, Michael; xx.”,
“Title”=> …},
{“Key” … … …}, …
–––––––––––––
From this I conclude it’s an array (length ≈300) of hashes. I want to select from this like »all records (hashes) where the {publication year} is {SomeVariable}
«. The where_exp filter does not work for me on an array of hashes. And to make matters worse, the keys contain space characters. [I would rather not rename the keys in the external file, but renaming the keys within Jekyll would be an option were I know how to rename a key in the entire array.]
What works for me, for example, is »myLib[0]["Publication Year"]
« but I would need to iterate over all array elements and it becomes slow. Something like this »myLib[*]["Publication Year"]
« (where * means entire array) would be great.
Looking forward to your advice, thanks, best, Michael
https://michaelbach.de