Skip to content
Advertisement

Accessing JSON Elements W/ Python

I want to access the individual data for ‘vin’, ‘make’, ‘year’, etc and export to a csv. I have tried accessing it by

JavaScript

I get a KeyError: ‘year’

This is part of the JSON tree I am working with

JavaScript

I am just a bit confused on the syntax as I have access data from a 2D array in this same manner.

Advertisement

Answer

You skipped the ‘_source’ section of json. This should fix it.

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement