This is working not a problem.
But I can't get any deeper into the JSON
Is there a guide for accessing/addressing all the arrays in the returned JSON?
for example, I have gotten this far: print item['offers'][2]['sku'], but I seem to be stuck, can get into the prices because I don't know how to access the arrays properly.
If someone could point out the fields and the way to access them, it would save a lot of time.
import json
import urllib
url = 'http://octopart.com/api/v3/parts/match?'
url += '&queries=[{"mpn":"SN74S74N"}]'
url += '&apikey=REPLACE_ME'
data = urllib.urlopen(url).read()
response = json.loads(data)
# print request time (in milliseconds)
print response['msec']
# print mpn's
for result in response['results']:
for item in result['items']:
print item['mpn']