---
title: "metafields"

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

# metafields


    The `metafields` object is dynamic, with its properties determined by the metafield configurations in the SHOPLINE Admin. You can access a specific [metafield](https://developer.shopline.com/docs/sline/object/metafield.md) object by its `key`. For example, if you have configured a metafield keyed with `custom_color` in the SHOPLINE Admin, you can access its corresponding object via `metafields.custom_color`.

    





    
## Example

        
            

            The code below demonstrates how to retrieve all `metafield` objects under the `product` object.


            

            
<SlineExample path={'/products/vip3'} objects={ 
    [""] 
}>
```sline
{{#var metafields = product | get_metafields("demo_ns") /}}
{{{ metafields | json() }}}

{{ metafields.demo_key | get_value() }}
```
</SlineExample>
            
        
    
