skip to Main Content

Use liquid object in json scheme shopify

Is there any option to use a liquid object in json scheme tag? For example I have a product-template.liquid file which contains following schema: {% schema %} { "name": "Product pages", "settings": [ { "type": "text", "id": "text_custom_1", "label": "Custom…

VIEW QUESTION

Accessing specific attribute of an object – Shopify

Hello I have the following object object = [#<ShopifyAPI::DiscountCode:0x000000000e1c78a8 @attributes={"code"=>"Disc2", "amount"=>"1.00", "type"=>"percentage"}, @prefix_options={}, @persisted=true>] How can I properly access the "code" name of that object? I have tried object[:code] and object.code but it appears I am overlooking something.

VIEW QUESTION
Back To Top
Search