To print the lines within some patterns when a searching pattern found in a file :  I want to print the lines within **{** and **}** with **assign where "mango" in Hostgroups**



       object Host "os.google.com" {
        import "windows"
        address = "linux.google.com"
        groups = ["linux"]
        }
        
        object Host "mango.google.com" {
        import "windows"
        address = "mango.google.com"
        groups = ["linux"]
        
        assign where "mango" in Hostgroups
        }


Desired output:

        object Host "mango.google.com" {
        import "windows"
        address = "mango.google.com"
        groups = ["linux"]
    
        assign where "mango" in Hostgroups
        }

