{guideData?.night_out_list.length > 0 &&
guideData?.night_out_list?
.map((guide_data, i) => (
// guide_data.main_category
))}
I have a loop like the above which returns a set of 19 results like so:
{
"main_category": "Nightclubs",
"type_title": "Nightclub",
"location_name": "Fig 19",
"location_link": "",
"location_photo": false,
"location_description": ""
}
{
"main_category": "Bars & Cocktails",
"type_title": "Cocktail Bar",
"location_name": "Mother's Ruin",
"location_link": "",
"location_photo": false,
"location_description": ""
}
There are essentially 3 different main_category which are Nightclubs, Bars & Cocktails and Other.
What I want to do is loop through each one of these. So firstly it would loop Nightclubs, then Bars & Cocktails and then all the results with Other.
I'm not sure how I would do this so any hope is much appreciated!