I have a JSON file, where i’m presenting the data from.
It’s working fine, but i have some formating issues.
The json file looks like this :
{
“Name” : “Fran”,
“Time” : “For Time”,
“Description” : [
“21 - 15 - 9 Reps for time”,
“thrusters 95/65 LB”,
“Pull-Ups”
],
“Equipment” : [
“Pull-Up Bar”,
“Barbell”
],
“Skill_Level” : “Medium”,
“Type” : “Girl”,
“Other” : “”
}
And i’m presenting it using this code :
{{ range $data.wod }}
<div class="w-full rounded overflow-hidden shadow-lg">
<div class="px-6 py-4">
<div class="font-bold text-xl mb-2">{{ .Name }}</div>
<p class="text-gray-700 text-base">
{{ .text }}
</p>
<p>
Type : {{ .Time }}
</p>
<p>
Description : {{ .Description }}
</p>
<p>
Equipment : {{ .Equipment }}
</p>
<p>
Skill Level : {{ .Skill_Level}}
</p>
<p>
Type : {{ .Type }}
</p>
<p>
Other : {{ .Other }}
</p>
</div>
</div>
{{end}}
My problem is, that i would like to present the data, in “Description” as multiple lines.
Today it’s being shown as a single line.
I’m guessing that i need to run thru it as a loop again ?
I can’t get my head around how to fix this.
Thanks