I am interested in highlighting a specific portion of the json document based on some arbitrary matching algorithm. For example
{
"text" : "hello world"
}
I searched for "hello" and above json document has hello in it. How to highlight that particular portion "hello" while displaying the document on the terminal using python? Also, the json has to be pretty printed.
Expected
{
"text" : " `hello` world"
}
Text that is qoutes should be displayed in red color.