respond_to do |format| format.html format.json { render json: { all_data: { data: @data, data1: @data1, data2: @data2 } } } end