mydict = {'fnpi': '1982650024', 'snpi': {'npi': '1932190360', 'value':
    2672}, 'snpis': [{'npi': '1831289255', 'value': 20}, {'npi':
    '1831139799', 'value': 20}, {'npi': '1386686137', 'value': 37}, {
    'npi': '1457355257', 'value': 45}, {'npi': '1427043645', 'value':
    53}, {'npi': '1477548675', 'value': 53}, {'npi': '1851351514',
    'value': 57}, {'npi': '1366446171', 'value': 60}, {'npi':
    '1568460640', 'value': 75}, {'npi': '1326046673', 'value': 109}, {
    'npi': '1548281124', 'value': 196}, {'npi': '1912989989', 'value':
    232}, {'npi': '1336147685', 'value': 284}, {'npi': '1801894142',
    'value': 497}, {'npi': '1538182779', 'value': 995}, {'npi':
    '1932190360', 'value': 2672}, {'npi': '1114020336', 'value': 3264}]}
value = mydict['snpi']['value']
npi = mydict['snpi']['npi']
snpis = mydict['snpis']
Finding k closest numbers to a given number