@model (Dictionary Items, int Level) @foreach (var (key, value) in Model.Items) { @if (value is string str) { if (!string.IsNullOrEmpty(key)) { } } else if (value is DictionarysubItems) { @* This is the array case *@ if (subItems.Count == 1 && subItems.First().Value is string str2) { } else { } } }
@key @if (str.StartsWith("http")) { @str } else { @value } @key @if (str2.StartsWith("http")) { @str2 } else { @subItems.First().Value } @Html.Raw($"{key}")