#2 Wrote component data to json objects