--- url: https://developer.youcan.shop/themes/filters/arrays/first.md --- # First Returns the first item of an array. You can also use `first` with dot notation, also in the middle of a path. ## Example ::: details Data ```json { "products": [ { "title": "Hat", "price": 10 }, { "title": "Tee", "price": 25.5 }, { "title": "Cap", "price": 8 } ] } ``` ::: ```liquid {% assign product = products | first %} {{ product.title }} {{ products.first.title }} ``` ::: tip Output ```html Hat Hat ``` :::