added example for hash slice method [ci skip]
fixed  typo [ci skip]
Merge pull request #17500 from rishijain/update_docs_4

added example for hash slice method [ci skip]