I am trying to match a value of a json file in my python code to another value of another API call within the same code itself. The values basically the same but it does not match because sometimes special characters or trailing/ending space causes a problem
Let's say:
value in the first json file:
json1['org'] = google, LLC
value in the second json file:
json2['org'] = Google-LLC
Tried using an in
operator in the code but it does not work. I am not sure how can I inculcate regex into this one.
So I write an if
statement like this:
if json1['org'] in json2['org']:
# *do something*
else:
# _do the last thing_
It just keeps on jumping on the else statement even though they are the same.
If the json values are same anyhow regardless of special characters and space, it should match and enter the if statement.