import json


def extract_json(infile):
	"""Returns distance and RSSI measurements as tuple"""
	# Load JSON output
	with open(infile, "r") as f: 
		data = json.load(f)

	# Extract data
	dist = float(data.keys()[0])
	adict = data.values()[0]
	rssi_list = adict.values()[0]

	return (dist,rssi_list)