Howdy! I am looking into some json data. I have parts of names, or longer names. The json provided is a list of randomly gathered data to match.
For example, I have an employee named John Doe. They could be within the json as their email, full name, or a concatenation of their name (as follows).
I have tried using list compare, merge, if statements. But I seem to be missing something.
The goal is to output only the data that has any of the names in a full list, within the janky list.
For example, the full list can include:
[
{
"name": "John Doe"
},
{
"name": "Jane Frances Dough"
}
]
and I am provided this janky list:
[
{
"name": "[email protected]",
"ID": 1
},
{
"name": "J Dough"
"ID": 2
},
{
"name": "Bob Barker"
"ID": 3
},
{
"name": "Barker"
"ID": 4
}
]
It should return:
[
{
"name": "[email protected]",
"ID": 1
},
{
"name": "J Dough"
"ID": 2
}
]
The closest I THINK I have come, is this:
It grabs the name from the incoming node, and searches the list of good names in another node. Adds true or false if it is there within the current node json. This would be used later in an if statement to do what is needed. I get an error to start with the toLower() not working. But besides that I THINK it is the right path?