--- layout: null --- [ {% for peer in site.data.orderbook %} {% assign reg_entry = site.data.register | map: peer[0] %} {% if reg_entry %} {% assign reg_entry = reg_entry[0] %} {% for o in peer[1] %} { "headline" : "{{ o.headline }}", "description" : "{{ o.description }}", "tags" : "{{ o.tags }}", "id" : "@{{ reg_entry.id }}", "hid" : "{{ reg_entry.id | append: o.headline | sha256 | slice: 0,6 }}", "price-per-unit" : {{ o.price-per-unit }}, {% capture priceref %}{{ o.price-reference | split: ',' | join: '-' }}{% endcapture %} {% capture price_ex %}{{ site.data.price-sources[priceref].price | plus: 0.00001 | round: 4 }}{% endcapture %} {% capture price %}{% if price_ex != "" %}{{price_ex}}{% else %}{{ o.price-source }}{% endif %}{% endcapture %} "price-reference" : "{% assign pr = o.price-reference | split: ',' %}{{ pr[1] }}", "price" : "{{ o.price-per-unit | divided_by: price | round: 1 | decimals }}" } {% unless forloop.last %},{% endunless %} {% endfor %} {% endif %} {% endfor %} ]