Iterator to json

Can anyone help me with mapping values in an iterator inside a json one after the other