Home Grab a single value from json response
Reply: 0

Grab a single value from json response

user951 Published in June 24, 2018, 3:07 am

First check two screen shots. One is debug error one is for json data visual view to give you better understanding. My main goal is to grab only "campaignId" value form this json response. I already tried to use JObject parse but getting error because RestSharp output not json string format so. Now tell me how can i grab that "campaignId" value of json response. Thanks in advance.

static void addEmailToList(string ListName, string Email, string Name)
            var client = new RestClient("https://api.getresponse.com/v3/campaigns?query[name]="+ListName);
            var GetIdreq = new RestRequest(Method.GET);
            GetIdreq.AddHeader("X-Auth-Token", "api-key 948df-my-key-7f3c6");
            GetIdreq.AddParameter("application/json", ParameterType.RequestBody);

            var GetIdres = client.Execute(GetIdreq);

            dynamic data = JObject.Parse(GetIdres);

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.317375 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO