we haven an OPEN HOUSE", "created": 1383331008000, "updated": 1383930450000, ``` --- ## handling json files use [jq](https://stedolan.github.io/jq/) for querying json files: ```bash $ cat example.json | jq '.' { "status": "past", "rating": { "count": 1, "average": 5 }, "utc_offset": -18000000, "group": { "name": "SOME CLUB", "join_mode": "approval", "who": "Members", "id": 12345 }, "description": "
we haven an OPEN HOUSE", "created": 1383331008000, "updated": 1383930450000, ``` --- ## handling json files use [jq](https://stedolan.github.io/jq/) for querying json files: ```bash $ cat example.json | jq '{id: .id, rating: .rating.average}' { "id": "148644612", "rating": 5 } ``` --- ## handling json files with array use [jq](https://stedolan.github.io/jq/) for querying json files: ```bash $ cat array.json [ { "status": "past", "rating": { "count": 1, "average": 5 }, "yes_rsvp_count": 8, "headcount": 0, "id": "148644612" }, { "status": "past", "rating": { "count": 0, "average": 0 }, ``` --- ## handling json files with array use [jq](https://stedolan.github.io/jq/) for querying json files: ```bash $ cat array.json | jq '.[]|{id: .id, rating: .rating.average}' | less { "id": "148644612", "rating": 5 } { "id": "150931712", "rating": 4.75 } ``` --- class: smallcode ## compressed files: zip see list of file with unzip -v before uncompressing ```bash $ unzip -v groups_new.zip Archive: groups_new.zip Length Method Size Cmpr Date Time CRC-32 Name -------- ------ ------- ---- ---------- ----- -------- ---- 0 Stored 0 0% 10-24-2014 12:50 00000000 groups_new/ 912939 Defl:N 151623 83% 10-24-2014 10:34 d331e014 groups_new/category_1.json 1308266 Defl:N 226343 83% 10-24-2014 10:44 51ae53a1 groups_new/category_10.json 667660 Defl:N 112417 83% 10-24-2014 10:44 c3cbb3d4 groups_new/category_11.json 596065 Defl:N 94715 84% 10-24-2014 10:44 9feb58bf groups_new/category_12.json ... 336000 Defl:N 51356 85% 10-24-2014 10:44 0b4d4b64 groups_new/category_8.json 1545754 Defl:N 247832 84% 10-24-2014 10:44 c95bd009 groups_new/category_9.json -------- ------- --- ------- 40093888 6725152 83% 36 files ``` --- class: smallcode ## compressed files: zip see content of files with unzip -c before uncompressing ```bash $ unzip -c groups_new.zip | less Archive: groups_new.zip extracting: groups_new/ inflating: groups_new/category_1.json [ { "category": { "shortname": "arts-culture", "name": "fine arts/culture" }, "city": "New York", "rating": 4.52, "description": "
discussing books chosen by the members of our group.