title: PySpark parse Json using RDD and json.load
body: <pre><code>{
  
    "city": "Tempe",
    "state": "AZ",
    ...
    "attributes": [
      "BikeParking: True",
      "BusinessAcceptsBitcoin: False",
      "BusinessAcceptsCreditCards: True",
      "BusinessParking: {'garage': False, 'street': False, 'validated': False, 'lot': True, 'valet': False}",
      "DogsAllowed: False",
      "RestaurantsPriceRange2: 2",
      "WheelchairAccessible: True"
    ],
    ...
  }
  </code></pre>
  
  <p>Hello, I am using PySpark and I am trying to output a tuple of (state, BusinessAcceptsBitcoin), currently I am doing:</p>
  
  <pre><code>csr = (dataset
          .filter(lambda e:"city" in e and "BusinessAcceptsBitcoin" in e)
          .map(lambda e: (e["city"],e["BusinessAcceptsBitcoin"]))
          .collect()
          )
  </code></pre>
  
  <p>But this command fails. How can I get the "BusinessAcceptsBitcoin" and "city" fields?</p>