--- title: "Liquid filters: last" description: Returns the last item in an array. api_name: liquid source_url: html: https://shopify.dev/docs/api/liquid/filters/last md: https://shopify.dev/docs/api/liquid/filters/last.md --- # last ```oobleck array | last ``` Returns the last item in an array. ```liquid {%- assign last_product = collection.products | last -%} {{ last_product.title }} ``` ## Output ```html Whole bloodroot ``` ### Dot notation You can use the `last` filter with dot notation when you need to use it inside a tag or object output. ```liquid {{ collection.products.last.title }} ``` ## Output ```html Whole bloodroot ```