@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 { } } }
@Safe.Raw(key) @if (Uri.IsWellFormedUriString(str, UriKind.RelativeOrAbsolute)) { @Safe.Raw(str) } else { @Safe.Raw(value?.ToString()) } @Safe.Raw(key) @if (Uri.IsWellFormedUriString(str2, UriKind.RelativeOrAbsolute)) { @Safe.Raw(str2) } else { @Safe.Raw(subItems.First().Value?.ToString()) } @Safe.Raw($"{key}")