Are you new to LWC ? Are you wondering how to loop in and make a nested accordion in LWC.? No worries. You are are at the right place. Today in this blog we will go through this simple requirement. We will see how we can loop and use lightning-accordion in our code. Use Case: Use case is very Simple . We need to Print all Contacts which are related to a particular account . We have done this several times using different methods. But in this blog we will see how we can use map to get Account Name as Key and the related contacts as the Value. It will have learn following in this blog: How to create Key map to pull all the Account Records which has atleast one Contact in key:value fashion. How to use Wire service to pull data. How to use Lightning Accordion. Let us jump into code now. Solution : Apex Controller In this Apex Class we are fetching all Contact records and the Account Name to which it is associated. We are then creating a map of Type Map<String, List...