Hi all!
I’m using external JSON file to show some data on a site.
Typically there is a structure like:
"data": {
"Choose_app_service_you_want_to_l": "Sherlock",
"Feedback_type": [],
"Usability": 4,
"Usefulness": 4
},
I’m using it with code:
{{ $choosen_tool := .data.Choose_app_service_you_want_to_l}}
But recently I saw in JSON items like this:
"data": null,
What ends with error:
nil pointer evaluating interface {}.Choose_app_service_you_want_to_l
I’ve tried “with”, I’ve tried if ne .data “null”, I’ve tried if eq .data “null” - nothing helps.
Is there a way to make Hugo ignore items with data: null?
Thanks!