Last active
August 7, 2019 20:25
-
-
Save linuxkidd/756b927ed4063ef1d60cc0428f77a7b7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import sys | |
| import json | |
| obj=json.load(sys.stdin) | |
| if ( len(sys.argv) > 0 ): | |
| for i in range(1,len(sys.argv)): | |
| levels=sys.argv[i].split('.') | |
| for j in range(0,len(levels)): | |
| if ( j == 0 ): | |
| newobj=obj | |
| if (levels[j]!=""): | |
| newobj=newobj[levels[j]] | |
| print newobj |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment