# Batch Properties for Contacts - read JSON into C#

**URL:** <https://community.hubspot.com/t/batch-properties-for-contacts-read-json-into-c/11381>\
**Category:** APIs & Integrations\
**Tags:** contacts\
**Created:** [October 16, 2018, 11:24am UTC](https://community.hubspot.com/t/batch-properties-for-contacts-read-json-into-c/11381 "2018-10-16T11:24:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [October 16, 2018, 11:24am UTC](https://community.hubspot.com/t/batch-properties-for-contacts-read-json-into-c/11381/1 "2018-10-16T11:24:31Z")

</div>

i am using C# to call this [https://api.hubapi.com/contacts/v1/contact/vids/batch/?vid=xxx&vid=yyy&vid=zzz&hapikey=Mykey](https://api.hubapi.com/contacts/v1/contact/vids/batch/?vid=xxx&vid=yyy&vid=zzz&hapikey=Mykey)  
can someone help me iterate the JSON that comes back so i can extract all the Properties name and value for each VID ?

I can get the JSON data into C# using this syntax

```auto
 var httpWebRequest = (HttpWebRequest)WebRequest.Create(url);
 httpWebRequest.ContentType = "application/json";
 httpWebRequest.Method = "GET";
 var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();

```

but i cant work out the code needed iterate the object and obtain All the property name and value pairs for each VID

---

<div class="post-metadata">

**Author:** ![cbarley](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cbarley/32/82559_2.png) [@cbarley](https://community.hubspot.com/u/cbarley)\
**Post date:** [October 18, 2018, 4:01pm UTC](https://community.hubspot.com/t/batch-properties-for-contacts-read-json-into-c/11381/2 "2018-10-18T16:01:49Z")

</div>

Hi [@stephenhall](https://community.hubspot.com/u/stephenhall), I won’t be able to help with the programming side as I don’t know much about C#. A forum dedicated to that language might be a good place to turn to if you’re stuck. That said, looks like C# has a forEach function that you can use to iterate through an object or array to grab the values from as per this stackoverflow article: [https://stackoverflow.com/questions/10315073/how-to-get-property-name-and-its-value](https://stackoverflow.com/questions/10315073/how-to-get-property-name-and-its-value)

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [October 18, 2018, 4:16pm UTC](https://community.hubspot.com/t/batch-properties-for-contacts-read-json-into-c/11381/3 "2018-10-18T16:16:26Z")

</div>

Thank you for the reply. yes i have solved it by iterating through the nested JSON to get its child and grandchild properties.

This issue is now solved.
