|
2250 | 2250 | "array_value": ""
|
2251 | 2251 | }
|
2252 | 2252 | ],
|
2253 |
| - "examples": [], |
| 2253 | + "examples": [ |
| 2254 | + { |
| 2255 | + "name": "", |
| 2256 | + "description": "", |
| 2257 | + "syntax": "", |
| 2258 | + "path": "/collections/all", |
| 2259 | + "raw_liquid": "{% assign product = collection.products | find: 'vendor', \"Polina's Potent Potions\" %}\n\n{{ product.title }}", |
| 2260 | + "parameter": false, |
| 2261 | + "display_type": "text", |
| 2262 | + "show_data_tab": true |
| 2263 | + }, |
| 2264 | + { |
| 2265 | + "name": "Returns `nil` when no items match the specified property value.", |
| 2266 | + "description": "", |
| 2267 | + "syntax": "", |
| 2268 | + "path": "/collections/all", |
| 2269 | + "raw_liquid": "{% assign product = collection.products | find: 'vendor', \"Polina's Potions\" %}\n\n{{ product.title | default: \"No product found\" }}", |
| 2270 | + "parameter": false, |
| 2271 | + "display_type": "text", |
| 2272 | + "show_data_tab": true |
| 2273 | + } |
| 2274 | + ], |
2254 | 2275 | "summary": "Returns the first item in an array with a specific property value.",
|
2255 | 2276 | "syntax": "array | find: string, string",
|
2256 | 2277 | "name": "find"
|
|
2269 | 2290 | "array_value": ""
|
2270 | 2291 | }
|
2271 | 2292 | ],
|
2272 |
| - "examples": [], |
| 2293 | + "examples": [ |
| 2294 | + { |
| 2295 | + "name": "", |
| 2296 | + "description": "", |
| 2297 | + "syntax": "", |
| 2298 | + "path": "/collections/all", |
| 2299 | + "raw_liquid": "{% assign index = collection.products | find_index: 'vendor', \"Polina's Potent Potions\" %}\n\n{{ index }}", |
| 2300 | + "parameter": false, |
| 2301 | + "display_type": "text", |
| 2302 | + "show_data_tab": true |
| 2303 | + }, |
| 2304 | + { |
| 2305 | + "name": "Returns `nil` when no items match the specified property value.", |
| 2306 | + "description": "", |
| 2307 | + "syntax": "", |
| 2308 | + "path": "/collections/all", |
| 2309 | + "raw_liquid": "{% assign index = collection.products | find_index: 'vendor', \"Polina's Potions\" %}\n\n{{ index | default: \"No index found\" }}", |
| 2310 | + "parameter": false, |
| 2311 | + "display_type": "text", |
| 2312 | + "show_data_tab": true |
| 2313 | + } |
| 2314 | + ], |
2273 | 2315 | "summary": "Returns the index of the first item in an array with a specific property value.",
|
2274 | 2316 | "syntax": "array | find_index: string, string",
|
2275 | 2317 | "name": "find_index"
|
|
2358 | 2400 | "array_value": ""
|
2359 | 2401 | }
|
2360 | 2402 | ],
|
2361 |
| - "examples": [], |
| 2403 | + "examples": [ |
| 2404 | + { |
| 2405 | + "name": "", |
| 2406 | + "description": "", |
| 2407 | + "syntax": "", |
| 2408 | + "path": "/collections/all", |
| 2409 | + "raw_liquid": "{% assign has_potent_potions = collection.products | has: 'vendor', \"Polina's Potent Potions\" %}\n\n{{ has_potent_potions }}", |
| 2410 | + "parameter": false, |
| 2411 | + "display_type": "text", |
| 2412 | + "show_data_tab": true |
| 2413 | + }, |
| 2414 | + { |
| 2415 | + "name": "Returns `false` when no items match the specified property value.", |
| 2416 | + "description": "", |
| 2417 | + "syntax": "", |
| 2418 | + "path": "/collections/all", |
| 2419 | + "raw_liquid": "{% assign has_potent_potions = collection.products | has: 'vendor', \"Polina's Potions\" %}\n\n{{ has_potent_potions }}", |
| 2420 | + "parameter": false, |
| 2421 | + "display_type": "text", |
| 2422 | + "show_data_tab": true |
| 2423 | + } |
| 2424 | + ], |
2362 | 2425 | "summary": "Tests if any item in an array has a specific property value.",
|
2363 | 2426 | "syntax": "array | has: string, string",
|
2364 | 2427 | "name": "has"
|
|
2667 | 2730 | "array_value": "untyped"
|
2668 | 2731 | }
|
2669 | 2732 | ],
|
2670 |
| - "examples": [], |
| 2733 | + "examples": [ |
| 2734 | + { |
| 2735 | + "name": "", |
| 2736 | + "description": "", |
| 2737 | + "syntax": "", |
| 2738 | + "path": "/collections/all", |
| 2739 | + "raw_liquid": "{% assign polina_products = collection.products | reject: 'vendor', \"Polina's Potent Potions\" %}\n\nProducts from other vendors than Polina's Potent Potions:\n\n{% for product in polina_products -%}\n - {{ product.title }}\n{%- endfor %}", |
| 2740 | + "parameter": false, |
| 2741 | + "display_type": "text", |
| 2742 | + "show_data_tab": true |
| 2743 | + } |
| 2744 | + ], |
2671 | 2745 | "summary": "Filters an array to exclude items with a specific property value.",
|
2672 | 2746 | "syntax": "array | reject: string, string",
|
2673 | 2747 | "name": "reject"
|
|
0 commit comments