Using custom date format - google-apps-script

I have this working script to sent mails with data from a Google sheet:
function SendEmail() {
let timestamp = 0
let poid = 1
let sku = 2
let qty = 3
let description = 4
let licenseid = 5
let itcost = 6
let total = 7
let company = 8
let contact = 9
let contactmail = 10
let endusermail = 11
let address = 12
let country = 13
let status = 14
let suppliermail = 15
let currency = 16
let otherinfo = 17
let brand = 18
let comment = 19
let cc = 20
let emailTemp = HtmlService.createTemplateFromFile("MAIL")
let ws = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("DATA")
let sd = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("DATA2")
let data = ws.getRange("A2:V" + ws.getLastRow()).getValues()
let sData = sd.getRange("B2:J" + sd.getLastRow()).getValues()
let sInfo = sData.map(function (r) { return r[0] })
data = data.filter(function (r) { return r[14] == 'SENTNOW' })
if (data.length) {
let found = false
data.forEach(function (row) {
emailTemp.ts = row[timestamp].toLocaleString("da-DK")
emailTemp.po = row[poid]
emailTemp.co = row[contact]
emailTemp.cm = row[company]
emailTemp.ad = row[address]
emailTemp.cu = row[country]
emailTemp.cn = row[contactmail]
emailTemp.sk = row[sku]
emailTemp.de = row[description]
emailTemp.qt = row[qty]
emailTemp.it = (row[itcost]).toLocaleString("da-DK")
emailTemp.to = (row[total]).toLocaleString("da-DK")
emailTemp.ce = row[comment]
emailTemp.cy = row[currency]
emailTemp.eu = row[endusermail]
emailTemp.li = row[licenseid]
emailTemp.ot = row[otherinfo]
let indexSupp = sInfo.indexOf(row[15])
if (indexSupp > -1) {
//only change status if supplierdata email is found
found = true
emailTemp.spname = sData[indexSupp][1]
emailTemp.saddress1 = sData[indexSupp][2]
emailTemp.saddress2 = sData[indexSupp][3]
emailTemp.scountry = sData[indexSupp][4]
emailTemp.sterms = sData[indexSupp][5]
emailTemp.scurrency = sData[indexSupp][6]
emailTemp.sothers = sData[indexSupp][7]
emailTemp.vat = sData[indexSupp][8] * 100
emailTemp.totvat = (row[total] * sData[indexSupp][8]).toLocaleString("da-DK")
emailTemp.totandvat = (row[total] + (row[total] * sData[indexSupp][8])).toLocaleString("da-DK")
let subjectLine = "Subject line # " + row[poid]
let htmlMessage = emailTemp.evaluate().getContent()
//only send email if supplierdata email is found
try {
GmailApp.sendEmail(
row[suppliermail],
subjectLine,
"",
{ name: 'Name', htmlBody: htmlMessage, bcc: 'myemail#domain.com' })
}
catch (err) {
SpreadsheetApp.getUi().alert(err)
}
}
})
if (found) {
let sh = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("DATA")
.getRange('O2:O')
.createTextFinder('SENTNOW')
.replaceAllWith('SENT')
}
}
}
Only problem is the date format emailTemp.ts = row[timestamp].toLocaleString("da-DK")
This give output date-format "11.2.2022 06.00.00" within the e-mail sent to the reciever.
What I wish is the date to be just "02/11/2022"
I tried emailTemp.ts = row[timestamp].toLocaleString("da-DK").getDisplayValue() but that was not working.
Any suggestions ?

You're going to have to figure out your time zone but try this.
emailTemp.ts = Utilities.formatDate(row[timestamp],"GMT","dd/MM/yyyy");
Reference
Utilities.formatDate()

Related

Check if column A is equal today's date and get the value of column B

I have a Google Sheet with a table like this:
Data
On Duty
Support
15/02/2023
Name1
Name4
16/02/2023
Name2
Name5
17/02/2023
Name3
Name6
I need to check the column A if the date is equal with today's date and get the value of column B and C and send the values to a slack channel.
I tried this but isn't working:
function sendSlackMessage() {
const onduty = QUERY("SELECT B WHERE todate(A)=date'" & text(today(), "dd/MM/yyyy") &"'");
const support = QUERY("SELECT C WHERE todate(A)=date'" & text(today(), "dd/MM/yyyy") &"'");
const url = "https://hooks.slack.com.services/xxxxxx/xxxxxxx/xxxxxxxxxxxxxxxxxxxxxx";
const params = {
method: "post",
contentType: "application/json",
payload: JSON.stringfy({
"text" : "Analyst on duty today: " + onduty + "\n" + "Support analyst: " + support
})
}
const sendMsg = UrlFetchApp.fetch(url, params);
var respCode = sendMsg.getResponseCode();
Logger.log(sendMsg);
Logger.log(respCode);
}
Here's how you can get the values:
const dt = new Date();
const dtv = new Date(dt.getFullYear(),dt.getMonth(),dt.getDate()).valueOf();
const ss = SpreadsheetApp.getActive();
const sh = ss.getSheetByName("Sheet0");
const vs = sh.getRange(2,1,sh.getLastRow() - 1, 2).getValues();
let vo = vs.map(r => {
let d = new Date(r[0]);
let dv = new Date(d.getFullYear(),d.getMonth(),d.getDate()).valueOf();
if(dtv == dv) {
return r[1];
} else {return null;}
}).filter(e => e);

Unable to parse the json in swift

I have a json response as follows
{
"payment_methods" = (
{
code = checkmo;
title = "Check / Money order";
},
{
code = "paypal_express";
title = "PayPal Express Checkout";
},
{
code = banktransfer;
title = "Bank Transfer Payment";
}
);
totals = {
"base_currency_code" = USD;
"base_discount_amount" = "-258.38";
"base_grand_total" = "2725.37";
"base_shipping_amount" = 400;
"base_shipping_discount_amount" = 0;
"base_shipping_incl_tax" = 400;
"base_shipping_tax_amount" = 0;
"base_subtotal" = "2583.75";
"base_subtotal_with_discount" = "2325.37";
"base_tax_amount" = 0;
"coupon_code" = ADAMAS10;
"discount_amount" = "-258.38";
"grand_total" = "2725.37";
items = (
{
"base_discount_amount" = "134.2";
"base_price" = 1342;
"base_price_incl_tax" = 1342;
"base_row_total" = 1342;
"base_row_total_incl_tax" = 1342;
"base_tax_amount" = 0;
"discount_amount" = "134.2";
"discount_percent" = 10;
"item_id" = 3292;
name = BWBCA14KWGVC015;
options = "[{\"value\":\"18K White Gold\",\"label\":\"Metal\"},{\"value\":\"2\",\"label\":\"size\"}]";
price = 1342;
"price_incl_tax" = 1342;
qty = 1;
"row_total" = 1342;
"row_total_incl_tax" = 1342;
"row_total_with_discount" = 0;
"tax_amount" = 0;
"tax_percent" = 0;
"weee_tax_applied" = "[]";
"weee_tax_applied_amount" = 0;
},
{
"base_discount_amount" = "124.18";
"base_price" = "1241.75";
"base_price_incl_tax" = "1241.75";
"base_row_total" = "1241.75";
"base_row_total_incl_tax" = "1241.75";
"base_tax_amount" = 0;
"discount_amount" = "124.18";
"discount_percent" = 10;
"item_id" = 3342;
name = BWBCA14KWGCV008;
options = "[{\"value\":\"18K White Gold\",\"label\":\"Metal Type\"},{\"value\":\"1.75\",\"label\":\"Ring Size\"}]";
price = "1241.75";
"price_incl_tax" = "1241.75";
qty = 1;
"row_total" = "1241.75";
"row_total_incl_tax" = "1241.75";
"row_total_with_discount" = 0;
"tax_amount" = 0;
"tax_percent" = 0;
"weee_tax_applied" = "[]";
"weee_tax_applied_amount" = 0;
}
);
"items_qty" = 2;
"quote_currency_code" = USD;
"shipping_amount" = 400;
"shipping_discount_amount" = 0;
"shipping_incl_tax" = 400;
"shipping_tax_amount" = 0;
subtotal = "2583.75";
"subtotal_incl_tax" = "2583.75";
"subtotal_with_discount" = "2325.37";
"tax_amount" = 0;
"total_segments" = (
{
code = subtotal;
title = Subtotal;
value = "2583.75";
},
{
code = discount;
title = "Discount (ADAMAS10)";
value = "-258.38";
},
{
code = shipping;
title = "Shipping & Handling (Flat Shipping Charge - Flat Shipping Charge)";
value = 400;
},
{
area = taxes;
code = tax;
"extension_attributes" = {
"tax_grandtotal_details" = (
);
};
title = Tax;
value = 0;
},
{
area = footer;
code = "grand_total";
title = "Grand Total";
value = "2725.37";
}
);
"weee_tax_applied_amount" = "<null>";
};
}
I need to fetch values from total segments.The code is shipping and value is Shipping & Handling (Flat Shipping Charge - Flat Shipping Charge.
I tried to parse the json using the below code
if let res = json as? [String:Any]
{
if let dict = res as? [String:Any]
{
if let total = dict as? [[String:Any]]
{
}
}
}
I am getting value till dict.But i am getting nil in the total variable.
How to get the total segments value?
you're missing out to mention the inner key path of the dictionary. hope this is what you're trying to do
if let res = json as? [String:Any] {
if let paymentMethods = res["payment_methods"] as? [[String:Any]] {
}
if let totals = res["totals"] as? [String:Any] {
if let items = totals["items"] as? [[String:Any]] {
}
}
}
Use this to get the total_segments and value of all code keys:
var codes = [String]()
if let res = json as? [String:Any] {
if let totals = res["totals"] as? [String:Any] {
if let totalSegments = totals["total_segments"] as? [[String:Any]] {
for segment in totalSegments {
if let code = segment["code"] as? String {
codes.append(code)
}
}
}
}
}

How to update all columns at once in Mysql

There is a database with 200 columns, how to update data from 21 to 200, not in this way -
Set Column21 = NEW.Column21,
Column22 = NEW.Column22,
Column23 = NEW.Column23,
Column24 = NEW.Column24,
Column25 = NEW.Column25...
//You can loop through 22 to 200 and make the string or access property
let sql = "Set",i=22;
[...Array(179)].forEach((_, l) => {
let column = 'Column'+i;
let val = "some val"; //access value
sql += ` ${column} = ${val} `;
i++;
});
console.log(sql);

Property has value in View but appears as 0 in page

Currently I am trying to display a user's age but it appears as 0 in the page.
This is the View
<div class="col-xs-6 col-sm-4 overview-box">
<table class="table-responsive">
<tbody>
<tr>
<td class="overview-description-wrap">
<span class="overview-description">#translations["Player_Age"]</span>
</td>
<td class="overview-info hidden-xs" style="display:table-cell">
<span class="overview-info-lg">#Model.Age</span>
#if (Model.ShowDateOfBirth)
{
<span class="overview-info-sm">(#Model.BirthDate.ToString("dd.MM.yyyy"))</span>
}
</td>
<td class="overview-info hidden-lg hidden-sm hidden-md">
<span class="overview-info-lg">#Model.Age</span>
<br />
<span class="overview-info-sm">(#Model.BirthDate.ToString("dd.MM.yyyy"))</span>
</td>
</tr>
</tbody>
</table>
</div>
And this is the action that gets the values
public PlayerOverviewViewModel GetPlayerViewModel(int playerId, int sport, int country, int currentPlayerId = 0, int clubId = 0, string color = "")
{
PlayerOverviewViewModel result = new PlayerOverviewViewModel();
Nomenclatures.Sports currentsport = (Nomenclatures.Sports)sport;
Nomenclatures.Countries currentCountry = (Nomenclatures.Countries)country;
var state = LoadPlayerState(playerId, sport);
var finishedMatches = GetFinishedMatches(state, playerId, rankingId: 0).ToList();
var upcomingMatches = GetUpcomingMatches(state, playerId, currentPlayerId, 9).ToList();
var testMatches = ParseUpcomingChallenges(state, upcomingMatches);
var eventInvitations = new List<EventInvitationViewModel>();
var tournamentInvitations = GetTournamentInvitations(currentPlayerId);
var parsedInvitations = ParseTournamentInvitations(state, tournamentInvitations);
eventInvitations.AddRange(parsedInvitations);
var clubLeagueInvitations = GetClubLeagueInvitations(currentPlayerId);
parsedInvitations = ParseClubLeagueInvitations(state, clubLeagueInvitations);
eventInvitations.AddRange(parsedInvitations);
var playerRankings = state.PlayerRankings;
var rankingNames = _data.OrganisationRankings.GetRankingNames(playerRankings.Select(x => x.OrganisationRankingId.Value));
var player = state.CurrentPlayer;
int organizationId = state.CurrentPlayer.HomeClubId ?? 0;
var topRanking = GetPlayerRanking(state);
var playerCareerTopRanking = GetPlayerHighestStanding(state);
var playerCareerTopRankingDate = GetTopPlayerRankingDate(state);
var doubleCareerTopRanking = GetTopDoubleRanking(state, sport, country);
var doubleCareerTopRankingDate = GetTopDoubleRankingDate(state, sport, country);
var homeclub = player.Organisation ?? new Organisation();
var profileImg = _data.Images.PlayerImage(playerId);
var playerCareerWins = GetPlayerCareerWins(playerId, sport, state.Challenges);
var playerCurrentYearWins = GetPlayerCurrentYearWins(playerId, sport, state.Challenges);
var playerCareerLooses = GetPlayerCareerLooses(playerId, sport, state.Challenges);
var playerCurrentYearLosses = GetPlayerCurrentYearLooses(playerId, sport, state.Challenges);
var doublePlayerCurrentYearWins = GetDoublePlayerCurrentYearWins(playerId, sport);
var doublePlayerCareerLooses = GetDoublePlayerCareerLooses(state, sport);
var doubleCareerWins = GetDoubleCareerWins(state, sport);
var doublePlayerCurrentYearLooses = GetDoublePlayerCurrentYearLooses(state, sport);
var careerEventParticipations = GetAllEventsParticipations(playerId, sport, state.Challenges);
var currentYearEventParticipations = GetCurrentYearEventsParticipations(playerId, sport, state.Challenges);
var doubleCareerEventParticipations = GetDoubleCareerEventParticipations(state, sport);
var doubleCurrentYearEventParticipations = GetDoubleCurrentYearEventParticipations(state, sport);
var best3Wins = GetBest3Wins(state, playerId);
var singlePlayerHighestRankingCurrentYear = GetSinglePlayerHighestRankingForCurrentYear(state);
var doublePartnerInvitation = GetDoublePartnerInvitation(playerId);
//var playerUnavalability = this.GetPlayerSchedule(playerId);
string racquetName = player.GetRacket();
string shoesName = player.GetShoes();
result.Id = player.p_id;
result.Name = player.Name;
result.FirstName = player.FirstName;
result.MiddleName = player.MiddleName;
result.LastName = player.LastName;
result.Email = player.UserProfile.Email;
result.Address = player.PersonalInfo.pi_address;
result.BirthDate = player.PersonalInfo.pi_birth;
result.Age = DateHelper.GetAge(result.BirthDate);
result.Gender = player.PersonalInfo.pi_gender == 1 ? "Male" : "Female";
result.UserName = player.UserProfile.UserName;
result.Country = player.PersonalInfo.Country.Name;
result.CountryCode = player.PersonalInfo.Country.Short.ToLower();
result.RankingType = ((Nomenclatures.RankingTypes)topRanking.r_rankingtype).Description();
result.RankingClass = ((Nomenclatures.EventClasses)(topRanking.r_class ?? 1)).Description();
result.Points = topRanking.vPoints;
result.Level = topRanking.r_level ?? 1;
result.Standing = topRanking.vStanding;
result.HomeClub = string.IsNullOrEmpty(homeclub.Name) ? "No home club" : homeclub.Name;
result.ImageUrl = _manager.GetImageUrl(profileImg.img_id, Nomenclatures.ImageType.UserProfilePic);
result.ImageId = profileImg.img_id;
result.Racquet = racquetName;
result.Shoes = shoesName;
result.DominantHand = ((Nomenclatures.DominantHand)player.PersonalInfo.DominantHand).ToString();
result.BackHand = ((Nomenclatures.Backhand)player.PersonalInfo.Backhand).ToString();
result.Facebook = player.PersonalInfo.FacebookProfile;
result.Twitter = player.PersonalInfo.TwitterProfile;
result.WebSite = player.PersonalInfo.WebSite;
result.EmailVisible = player.PersonalInfo.pi_email_v;
result.ShowDateOfBirth = player.PersonalInfo.pi_birth_v || player.p_id == currentPlayerId;
//result.ScheduleDays = playerUnavalability.ScheduleDays;
//result.PlayerUnavalabilityVM = playerUnavalability;
result.PlayerCountryFlag = player.PersonalInfo.Country.Short.ToLower();
result.CareerWins = playerCareerWins;
result.GlobalEventsParticipatedSingles = careerEventParticipations;
result.EventsParticipatedSingles = currentYearEventParticipations;
result.CareerWinLossSingles = playerCareerWins + "-" + playerCareerLooses;
result.WinLossSingles = playerCurrentYearWins + "-" + playerCurrentYearLosses;
result.CareerWinLossDouble = doubleCareerWins + "-" + doublePlayerCareerLooses;
result.WinLossDoubles = doublePlayerCurrentYearWins + "-" + doublePlayerCurrentYearLooses;
result.GlobalEventsParticipatedDoubles = doubleCareerEventParticipations;
result.EventsParticipatedDoubles = doubleCurrentYearEventParticipations;
result.Best3Wins.Items = new List<ICarouselItem>(best3Wins);
result.CareerHighSingles = playerCareerTopRanking == 0 ? "-" : playerCareerTopRanking.ToString();
result.CareerHighDoubles = doubleCareerTopRanking == 0 ? "-" : doubleCareerTopRanking.ToString();
result.CareerHighDateSingles = playerCareerTopRankingDate;
result.CareerHighDateDoubles = doubleCareerTopRankingDate;
result.SinglesHighestRankingCurrentYear = singlePlayerHighestRankingCurrentYear == 0 ? "-" : singlePlayerHighestRankingCurrentYear.ToString();
result.DoublesHighestRankingCurrentYear = ""; //TODO: implement this
result.DoublePlayers = new List<DoublePartnersViewModel>();//TODO: implement this
result.PlayerRankings = playerRankings;
result.RankingNames = rankingNames;
result.CurrentSport = currentsport;
result.RankingCountry = currentCountry;
result.SportNumber = sport;
result.CountryNumber = country;
result.ParticipantType = (int)player.ParticipantType;
result.Class = player.p_class ?? 1;
result.DoubleInvitations = doublePartnerInvitation;
result.LastDonationDate = player.LastDonationDate;
int months;
int.TryParse(ConfigurationManager.AppSettings["donationPeriod"], out months);
result.IsDonated = player.LastDonationDate != null && player.LastDonationDate.Value.AddMonths(months) >= DateTime.UtcNow.Date;
var form = finishedMatches.OrderByDescending(x => x.Date).Take(5).Select(x => x.IsWon ? "W" : "L");
result.Form = form;
result.MatchesSection = new MatchesSectionVM
{
PlayerId = playerId,
CurrentPlayerId = currentPlayerId,
FinishedMatches = finishedMatches,
UpcomingMatches = testMatches,
UpcommingMatchesWatermark = !testMatches.Any(),
EventInvitations = eventInvitations,
FinishedMatchesWatermark = !finishedMatches.Any(),
LeftButtonName = "Confirm",
WatermarkMessage = "You dont have any matches to confirm. Create a challenge or join an event",
ShowButtons = currentPlayerId == playerId,
};
return result;
}
And this is the action that displays everything
[Authorize]
public ActionResult Index(int clubId = 0, string color = "")
{
if (mPlayerID == 0)
{
WebSecurity.Logout();
return RedirectToAction("login", "account", new { clubId, color });
}
var playerViewModel = _service.GetPlayerViewModel(mPlayerID, (int)mSport, (int)mCountry, mPlayerID, clubId, color);
playerViewModel.HasPhoto = _data.Images.PlayerHasPhoto(mPlayerID);
var profileCompletion = GetProfileCompletionPercents(playerViewModel);
playerViewModel.Id = mPlayerID;
playerViewModel.CurrentPlayerId = mPlayerID;
playerViewModel.DonationModel = new PayPalDonationModel(_data, mPlayerID);
playerViewModel.Languages = _cacheService.GetActiveLanguages();
ViewBag.ProfileCompletion = profileCompletion.Item1;
ViewBag.CompletionNext = profileCompletion.Item2;
return View(playerViewModel);
}
The only things that don't appear are the birth date and the user's age. Any suggestions ? Debugger shows that the properties have values in the View.

Swift Firebase data format

when I did asked firebase the following.
print("\(WarSerArray[CompanyData.companyName]!.allValues)")
print("keys\(WarSerArray[CompanyData.companyName]!.allKeys)")
it printed out this information.
[{
PhonNumber = 7607588500;
address = "2378 Primrose Ave. Vista, CA. 92083";
currentStoreArray = Headquarters;
email = "james#opportunitysoftware.com";
faxNumber = "";
key = "-KLSM8y0BDfs6B1jtsA5";
name = "Service Center 1";
}]
keys[-KLSM8y0BDfs6B1jtsA5]
[{
PhonNumber = 7607588500;
address = "2378 Primrose Ave. Vista, CA. 92083";
currentStoreArray = Headquarters;
email = "james#opportunitysoftware.com";
faxNumber = "";
key = "-KLSM8zu6AFKa7V0beCh";
name = "Warehouse 1";
}]
keys[-KLSM8zu6AFKa7V0beCh]
how do I get name?
var CompanyData = CompanyDataStruct()
struct CompanyDataStruct {
var key = ""
var webpage:String! = ""
var OwnerName:String! = ""
var address:String! = ""
var managerPNumber:String = ""
var dueOnOrder = 0.0
var email:String! = ""
var fax:String! = ""
var itemsOrderHistory:String! = ""
var companyName:String! = ""
var money = 0.0
var notes:String! = ""
var tax = 0.0
var pNumber:String = ""
var ManagerContact = ""
var opw:String! = ""
var mpw:String! = ""
var OwedToCompany = 0.0
var OwedString:String! = ""
var taxID:String! = ""
var reSalesID:String! = ""
var BoxCount = 0
var secondTicketID:String! = ""
var secondTicketNumber = 0
var useSecondTicketID = false
var printerSettings = ""
var quoteDays = 0
var fulfillmentPrinter = false
var fulfillmentEmail = false
var printBill = false
var emailBill = false
var system = false
var printReceipt = false
var emailReceipt = false
var theFulFillEmail = ""
var logoName = ""
var delivery = false
var ac1 = ""
var ac2 = ""
var ac3 = ""
var storeID = ""
var warehouse = ""
var serviceCenter = ""
var currentStore = ""
var StoreCount = 0
var WareHouseCount = 0
var ServiceCenterCount = 0
var MoneySymbol = ""
var refundLevel = 0
var shareBarcode = true
var LoGoImage = DefaultImage
}
var WarehouseData2 = WareServiceStruct()
struct WareServiceStruct {
var name = String()
var address = String()
var currentStoreArray = String()
var phoneNumber = String()
var faxNumber = String()
var email = String()
var key = String()
}
let WareSerRef = FIRDatabase.database().reference().child("Owner").child("CompanyName").child("WareServ")
let WareSerRefName = FIRDatabase.database().reference().child("Owner").child("CompanyName").child("WareServ").child("name")
let WareSerRefAddress = FIRDatabase.database().reference().child("Owner").child("CompanyName").child("WareServ").child("address")
let WarSerRefCurrentStore = FIRDatabase.database().reference().child("Owner").child("CompanyName").child("WareServ").child("CurrentStore")
let WareSerRefPhone = FIRDatabase.database().reference().child("Owner").child("CompanyName").child("WareServ").child("PhoneNumber")
let WareSerRefFax = FIRDatabase.database().reference().child("Owner").child("CompanyName").child("WareServ").child("faxNumber")
let WareSerRefEmail = FIRDatabase.database().reference().child("Owner").child("CompanyName").child("WareServ").child("email")
let WareSerRefKey = FIRDatabase.database().reference().child("Owner").child("CompanyName").child("WareServ").child("key")
func WarehouseFirebaseSetter(sedner: WareServiceStruct) {
let key = WareSerRef.childByAutoId().key
WarehouseData2 = sedner
WarehouseData2.key = key
let WareToAdd = FBWarhouseData
let childUpdates = ["/Warehouse /\(CompanyData.companyName)/\(key)":WareToAdd]
WareSerRef.updateChildValues(childUpdates)
}
var FBWarhouseData = ["address" : WarehouseData2.address,"currentStoreArray" : WarehouseData2.currentStoreArray,"email" : WarehouseData2.email,"faxNumber" : WarehouseData2.faxNumber,"PhonNumber" : WarehouseData2.phoneNumber,"name" : WarehouseData2.name,"key" : WarehouseData2.key] as NSDictionary