looping through dictionaries and started constructing json output. wip.