I have data in this format
[
{
"title": "Start",
"time": "0:00"
},
{
"title": "Feudal Age",
"time": "0:36"
},
{
"title": "Castle Age",
"time": "0:52"
}
]
And i’d like to print a simple statement, like
Start Time was: 0:00
Feudal Age Time was 0:36
Castle Age Time was 0:52
However sometimes, there is no Castle Age time. So using something like this gives us an error:
echo Castle Age Time was {{ $item("2").$node["Code"].json["time"] }}
In cases like these I normally use something like this as a fallback:
{{ $item("2").$node["Code"].json["time"] ?? "Not Found"}}
But this doesn’t work!
Any advice on what I should do?