Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save m-mizutani/1895732596ab0a4f817d5dfa94fb6b8e to your computer and use it in GitHub Desktop.
Save m-mizutani/1895732596ab0a4f817d5dfa94fb6b8e to your computer and use it in GitHub Desktop.
JSON.pase
~/t/a $ cat parse.js
request = require('request')
request.get('https://ctftime.org/api/v1/events/?limit=100&start=1422019499&finish=1423029499', (err, data) => {
const jdata = JSON.parse(data.body);
console.log(jdata);
});
~/t/a $ node parse.js
[ { organizers: [ [Object] ],
onsite: false,
finish: '2015-01-24T08:00:00+00:00',
description: 'Registration will be open when CTF Start\r\n#WCTF #th3jackers\r\nhttp://ctf.th3jackers.com/',
weight: 5,
title: 'WCTF - th3jackers',
url: 'http://ctf.th3jackers.com/',
is_votable_now: false,
restrictions: 'Open',
format: 'Jeopardy',
start: '2015-01-23T20:00:00+00:00',
participants: 18,
ctftime_url: 'https://ctftime.org/event/190/',
location: '',
live_feed: '',
public_votable: false,
duration: { hours: 12, days: 0 },
logo: '',
format_id: 1,
id: 190,
ctf_id: 93 } ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment