File: extract-json.py

package info (click to toggle)
mongrel2 1.12.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 5,976 kB
  • sloc: ansic: 39,083; python: 2,833; sql: 1,555; sh: 467; makefile: 360; asm: 189; yacc: 145; php: 73; awk: 28; sed: 5
file content (7 lines) | stat: -rw-r--r-- 157 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
#!/bin/env python
import json
from sys import stdin, argv, stdout
obj = json.load(stdin)
for item in argv[1:]:
    obj=obj[item]
stdout.write(str(obj)+'\n')