I am stuck:
I have a json database with all the entries from flex, each entry at the moment looks like this:
"onuuookjnnkwkwcn": { "date_published": "17-11-2017 15:32", "published": true, "highlighted": true, "description": "Lorem ipsum dolor sit ametLorem ipsum dolor sit ametLorem ipsum dolor sit ametLorem", "price": 1789, "listing_type": false, "website": "www.miosito.it", "comforts": [ "sss", "ffff" ], "tags": [ "fff", "wqqqq" ], "item_image": { "user\/data\/flex-directory\/files\/r7wqyBXEUnub2xp.png": { "name": "r7wqyBXEUnub2xp.png", "type": "image\/png", "size": 27731, "path": "user\/data\/flex-directory\/files\/r7wqyBXEUnub2xp.png" }
and a twig with this code:
{% set data = flex_entries.getData().toArray()|sort_by_key(‘date_entered’) %}
Sort by Description<ul class="list"> {% for entry in data if entry.published %} <li> {{ entry.item_image.0.path }} </li> {% endfor %} </ul>
i am not able to read the path value in json what am I missing?
thanks