I’m trying to parse JSON contents (through a shortcode) and getting really weird results with 80% of the content just dropped.
I’ve simplified my code down to bare bones for debugging and now my JSON looks like that:
{
"rows": [
{
"nothing" : "first",
"nothing" : "second",
"nothing" : "third",
"alert" : "fourth",
"nothing" : "fifth",
"nothing" : "sixth",
"alert" : "seventh",
"nothing" : "ninth",
"nothing" : "tenth"
}
]
}
I parse it through a shortcode like that:
{{ $file := .Get 0 }}
{{ $datasource := getJSON $file }}
{{ $datasource }}
And the result which I am NOT expecting is this:
map[rows:[map[alert:seventh nothing:tenth]]]
Only two key-value pairs are present.
What could be the reason? Where to approach the problem?
I’ve cleaned cache with hugo mod clean --all
.