C# LINQ separate row into two rows based on List<String> property

C# LINQ separate row into two rows based on List<String> property

I have a list of&nbsp;<code>IPInfo</code>&nbsp;objects already filtered in some way. My problem is to separate records based on last&nbsp;<code>List&lt;String&gt;</code>&nbsp;property:

I have a list of IPInfo objects already filtered in some way. My problem is to separate records based on last List<String> property:

class IPInfo
{
    public String TRADE_DATE; 
    public String CUSTOMER_NAME;
    public List<String> ORIGINAL_IP;
    public List<String> LOGON_IP = new List<String>();
}

List<IPInfo> fields when exported to .xls file looks like this: 


I need each Logon IP record to be in a separate row, but Original IP to remain combined. On a picture, for CITI I need:

----------------------------------------------
10.55.13.104     |   128.110.34.102
128.110.34.102   |
----------------------------------------------
10.55.13.104     |   10.55.13.104
128.110.34.102   |

Any help?

EDIT: this query was applied before to combine duplicated Logon IPs. But, as I told, I need Logon IPs separated

    private static List<IPInfo> selectFields(ref List<IPInfo> fields)
    {
        var distinct =
            fields
                .GroupBy(x => new { x.TRADE_DATE, x.CUSTOMER_NAME })
                .Select(y => new IPInfo()
                {
                    TRADE_DATE = y.Key.TRADE_DATE,
                    CUSTOMER_NAME = y.Key.CUSTOMER_NAME,
                    ORIGINAL_IP = y.SelectMany(x => x.ORIGINAL_IP).Distinct().ToList(),
                    LOGON_IP = y.SelectMany(x => x.LOGON_IP).Distinct().ToList()
                })
                .ToList();

    return distinct;
}


Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

C/C++ vs. Rust: A developer’s perspective

In this post, you'll see the difference between Rust and C/C++ in a developer’s perspective

Compiled C# Linq expression and querying Mongo

I've inherited some code from a former employee that queries a mongo DB using compiled Linq expressions and the&nbsp;<a href="https://github.com/RobThree/MongoRepository" target="_blank">MongoRepository library</a>&nbsp;(which sits on top of the MongoDB C# driver).