How to get the first item from an array [SOLVED]

This is where the index function will hopefully come in handy…

{{$section_name := index (.Site.Params.mainsections) 0}}