parse elements and save to json