Not sure exactly how to illustrate this in the title, so apologies if this doesn’t align with “Drop/Ignore Fields if Matches List”. I have a list of JSON items containing 4 fields with numbers that look like this. While at least one of these fields will exist, it’s likely that only 1 or 2 of them will be there, so I’ve included a second sample of data with only two fields.
{
"phonenumber":
"+15551112222",
"mobilenumber":
"+15552221111",
"mobilenumber2":
"+15552221234",
"homenumber":
"+15552227777",
"name":
"Happy User",
"emailaddress":
"[email protected]"
}
{
"mobilenumber2":
"+15552221234",
"homenumber":
"+15552227777",
"name":
"Happy User",
"emailaddress":
"[email protected]"
}
Separate from this, I have a list of clients with phone numbers, sample shown below.
{
"name":
"Main",
"client_name":
"Happy Customer",
"phonenumber":
"+15552221234"
}
What I need to do is compare each of the fields in the first set of data against the “phonenumber” field from the second set of data and drop just the field of data in the first set if it matches the second set. So, using the examples above, my two sample sets would end up looking like this:
{
"phonenumber":
"+15551112222",
"mobilenumber":
"+15552221111",
"homenumber":
"+15552227777",
"name":
"Happy User",
"emailaddress":
"[email protected]"
}
{
"homenumber":
"+15552227777",
"name":
"Happy User",
"emailaddress":
"[email protected]"
}