---
title: "get"

doc_type: static
doc_category: static
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/sline/filter/get'
  md: 'https://developer.shopline.com/docs/sline/filter/get.md'
---

# get


    Gets a resource object by ID or handle, or gets a value from an object by key.

    This filter supports two usage patterns:

- When used with [all_products](https://developer.shopline.com/docs/sline/object/all-products.md), [all_collections](https://developer.shopline.com/docs/sline/object/all-collections.md), [all_articles](https://developer.shopline.com/docs/sline/object/all-articles.md), [all_blogs](https://developer.shopline.com/docs/sline/object/all-blogs.md), or [all_pages](https://developer.shopline.com/docs/sline/object/all-pages.md), it gets a single resource object by the specified ID or handle.
- When used with an object other than the resource collection objects mentioned above, it gets the value of the specified key from that object.

> **CAUTION**
>
> To ensure store performance and responsiveness, this filter can be called up to 50 times during a single page rendering process. When multiple calls use identical input parameters, they are deduplicated and counted as one call. Once the call limit is reached, subsequent calls will return `nil`.



    
`obj | get(key)` returns data of any type.
    



    
        ## Required params

        
            - `obj` `any`\: The resource collection or object to read from.
        
            - `key` `string`\: The ID or handle of the desired resource, or the key of the desired value.
        
    





    
## Examples

        
            ### Getting a product by handle and rendering the product title

            

            

            
<SlineExample path={''} objects={ 
    [""] 
}>
```sline
{{#var myProduct = all_products | get("winter-wonderland-gift-box") /}}
{{ myProduct.title }}
```
</SlineExample>
            
        
            ### Getting a value from an object by key

            

            

            
<SlineExample path={'/products/winter-wonderland-gift-box'} objects={ 
    [""] 
}>
```sline
{{ product | get("title") }}
```
</SlineExample>
            
        
    
