fix foreach nest in jsonify