Finding text in json with python
Question: I've got a json file that I'm importing into Python and trying to look for the
occurrence of a phrase. If I try this:

    
    
    any(keyword in s for s in json_data)
    

where keyword is the thing I'm looking for and json_data is what I got from
using json.load(). It always returns false even when the keyword is in
json_data. Here's how I'm indexing into the json:

    
    
    json_data["thing1"]["thing2"][0]["thing3"]
    

The field [0] varies from 0-16 and the thing I want is in thing3. Why can't I
get a True even when the keyword is in json_data?


Answer: 
    any(keyword in s for s in json_data)
    

is looking in the first level dictionary, where `thing1` is located. You have
to look at the dictionary containing `thing3`, which is the indexed one

    
    
    any(keyword in s for s in json_data["thing1"]["thing2"])
    

Assuming `thing3` is the `keyword` you are looking for...

