Click here to Skip to main content
15,890,512 members

Comments by Mandavali (Top 7 by date)

Mandavali 2-Aug-21 11:22am View    
I want to save data only from user data section
"user-data": [
{
"field": "Name",
"value": "Some Name"
},
{
"field": "Visit",
"value": "Visitor"
},
{
"field": "Email Address",
"value": "email@email"
}
{
"field": "Phone",
"value": "Phonenumber"
}

]
Mandavali 2-Aug-21 11:19am View    
public class Attributes
{
public string name { get; set; }

[JsonProperty("time-zone")]
public string TimeZone { get; set; }
public string timezone { get; set; }
public string locale { get; set; }
public string address { get; set; }

[JsonProperty("address-line-one")]
public string AddressLineOne { get; set; }

[JsonProperty("address-line-two")]
public string AddressLineTwo { get; set; }
public string city { get; set; }
public string state { get; set; }
public string country { get; set; }
public string zip { get; set; }
public double longitude { get; set; }
public double latitude { get; set; }

[JsonProperty("full-name")]
public string FullName { get; set; }
public string email { get; set; }
public object host { get; set; }

[JsonProperty("host-email")]
public object HostEmail { get; set; }

[JsonProperty("user-data")]
public List<userdata> UserData { get; set; }

[JsonProperty("email-status")]
public string EmailStatus { get; set; }
}
public class Data
{
public string id { get; set; }
public string type { get; set; }
}

public class Company
{
public Data data { get; set; }
public string id { get; set; }
public string type { get; set; }
public Attributes attributes { get; set; }
}
public class UserData
{
public string field { get; set; }
public string value { get; set; }
}
public class Payload
{
public string id { get; set; }
public string type { get; set; }
public Attributes attributes { get; set; }
public Relationships relationships { get; set; }
}

public class Root
{
public string @event { get; set; }
public Meta meta { get; set; }
public Payload payload { get; set; }
}
Mandavali 28-Jul-21 15:59pm View    
Thank you so much I am learning and very new to Json and webhook.
in foreach loop now I should be able access it by property correct..
string strName = Data.["Name"] and at that point I should setup a database connection and supply the values correct.
Mandavali 28-Jul-21 11:18am View    
I don't know why object="" is showing there no object="" in line it is just object
Mandavali 28-Jul-21 11:17am View    
sorry the line is IDictionary<string, object=""> keyValues = JsonConvert.DeserializeObject<idictionary<string, object="">>(data);