Hi Nandini,
Can you clarify the below so that we can better understand and provide a proper solution,
Will update the answer once we get a clear idea of what needs to implemented here. Thanks.
UPDATE:
Trying my best here to understand with the info provided,
So after you have created the 2 sets of NPEs from your API calls and imports, you will have two list of NPE1 and NPE2, iterate over these 2 list and create NPEList objects and map Attribute_A and Attribute_B to MainAttribute_1 and MainAttribute_2 of NPEList for NPE1 and map Attribute_C and Attribute_D to MainAttribute_1 and MainAttribute_2 of NPEList for NPE2 respectively. Now you have a single list of NPEList, would this work?