I have a component with a field "video" which is linked to a component which consist of a youtube url. I just want to fetch that url from that component. My code below what I tried
@if(Model.Component.Fields["video"].Containskey("video"))
{
@Model.component.Fields["video"].LinkedComponentValues[0].Fields["code"].Value
}
I am getting "The given key was not present in the dictionary"
Normally, if I use this code I can fetch that youtube Url @Component.Fields.video.Fields.code
But when using dd4t template I am facing issues.