Reformatting large JSON file
I've just finished (legally) scraping a site for a bunch of TV show titles. It's my first time doing this, and I was able to organize the JSON output using Atom's pretty-json plugin, but the data isn't in a usable format yet.
* I scraped the site with a Scrapy spider, this is my spider code.
* My spider parsed the content and stored each title in a single, massive list – one list for each alphabetical page. Here's the output JSON file after being prettied up.
* I now need to use this JSON data in an autocomplete function, which I'm a bit confused about. I'm using the autocomplete input form from Materialize.CSS, which uses jQuery's autocomplete function.
So the last bullet point is where I'm stuck. How can I format this massive JSON file to be a key-value pair like this:
"title_of_book" : null,
The reason for this is that the data autocomplete takes looks like this:
"Adventure Inc." : null,
"…" : null,
Thanks in advance!
Submitted July 16, 2017 at 04:48PM by YelluhJelluh
via reddit http://ift.tt/2up0TcV