Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dotliquid not parsing object array in liquid template #534

Open
furqanms opened this issue Oct 28, 2023 · 0 comments
Open

Dotliquid not parsing object array in liquid template #534

furqanms opened this issue Oct 28, 2023 · 0 comments

Comments

@furqanms
Copy link

Dotliquid 2.2.692

Expected behavior

[
"Apple - $1.99",
"Banana - $0.99",
"Orange - $1.49",
]

Actual behavior

[
]

Steps to reproduce the Problem (you can add files)

Liquid Template : test.liquid

{% assign fruits = [
  {"name": "Apple", "price": 1.99},
  {"name": "Banana", "price": 0.99},
  {"name": "Orange", "price": 1.49}
] %}

[
{% for fruit in fruits %}
  "{{ fruit.name }} - ${{ fruit.price }}",
{% endfor %}
]

Is there any way to define json array in liquid and populate in liquid to produce a result ?

Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant