title: Scraping a JSON response with Scrapy
body: <p>How do you use Scrapy to scrape web requests that return JSON? For example, the JSON would look like this:</p>
  
  <pre><code>{
      "firstName": "John",
      "lastName": "Smith",
      "age": 25,
      "address": {
          "streetAddress": "21 2nd Street",
          "city": "New York",
          "state": "NY",
          "postalCode": "10021"
      },
      "phoneNumber": [
          {
              "type": "home",
              "number": "212 555-1234"
          },
          {
              "type": "fax",
              "number": "646 555-4567"
          }
      ]
  }
  </code></pre>
  
  <p>I would be looking to scrape specific items (e.g. <code>name</code> and <code>fax</code> in the above) and save to csv.</p>