Hi Expert,
I am struggling to get nested grouped by data using fetch xml in portal liquid template.
for e.g first group by on Product entity
Product A, Product B. Within that I have some other lookup and can have different values under the Product A or B.
So the structure Goes like this:
Product A
-Type - Raw
Manufactured Date : 05/01993
-Type - ReadyMade
Manufactured Date : 05/01977
-Type Raw
Manufactured Date : 05/07/1930
Should simply be :
Products A ( first Grouby)
Type - Raw
Manufactured Date : 05/01993
Manufactured Date : 05/07/1930
Type - ReadyMade
Manufactured Date : 05/01977
Below code is to get the first level grouping - not sure how to proceed with other nested group.
{
fetch xml here///
}
{% assign groups = my_query.results.entities | group_by: 'group by field' }
{% for group in groups %}
{{ group.key }}
{% for item in group.items %}
*This post is locked for comments