# How to deserialize JSON array

**URL:** <https://forum.uipath.com/t/how-to-deserialize-json-array/210098>\
**Category:** Robot\
**Tags:** json, system, webapi, activities\
**Created:** [Avril 8, 2020, 12:05 UTC](https://forum.uipath.com/t/how-to-deserialize-json-array/210098 "2020-04-08T12:05:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tex\_Willer](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/tex_willer/32/104707_2.png) [@Tex\_Willer](https://forum.uipath.com/u/Tex_Willer)\
**Post date:** [Avril 8, 2020, 12:05 UTC](https://forum.uipath.com/t/how-to-deserialize-json-array/210098/1 "2020-04-08T12:05:57Z")

</div>

Hello,  
I’m trying to deserialize a JSON array. This is the data sample:

[{“F1”:“75153”,“F2”:“078409”,“F3”:“ABC Inc.”,“Status”:“IN”,“score”:“4.161”,“cf”:“1.000”},{“F1”:“12218”,“F2”:“218272”,“F3”:“XYZ llc”,“Status”:“AC”,“score”:“4.161”,“cf”:“1.000”}]

I need to populate a datatable with columns: F1, F2, F3, Status, score, cf pulling the data from the array.

How do I do that?

Thanks!

---

<div class="post-metadata">

**Author:** ![Anthony\_Humphries](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anthony_humphries/32/137064_2.png) [@Anthony\_Humphries](https://forum.uipath.com/u/Anthony_Humphries)\
**Post date:** [Avril 8, 2020, 12:07 UTC](https://forum.uipath.com/t/how-to-deserialize-json-array/210098/2 "2020-04-08T12:07:19Z")

</div>

You can use this activity:

> **[Deserialize Json](https://docs.uipath.com/activities/docs/deserialize-json)**
>
> UiPath.WebAPI.Activities.DeserializeJson Deserializes the JSON string to a JObject. Properties Common DisplayName - The display name of the activity. Input JsonString - The string containing the JSON to be deserialized. The JSON should be written...

---

<div class="post-metadata">

**Author:** ![praneeth.peyyeti](https://avatars.discourse-cdn.com/v4/letter/p/db5fbb/32.png) [@praneeth.peyyeti](https://forum.uipath.com/u/praneeth.peyyeti)\
**Post date:** [Avril 8, 2020, 12:20 UTC](https://forum.uipath.com/t/how-to-deserialize-json-array/210098/3 "2020-04-08T12:20:05Z")

</div>

Hi,

You can also try this method  
assign strJson= “[{“F1”:“75153”,“F2”:“078409”,“F3”:“ABC Inc.”,“Status”:“IN”,“score”:“4.161”,“cf”:“1.000”},{“F1”:“12218”,“F2”:“218272”,“F3”:“XYZ llc”,“Status”:“AC”,“score”:“4.161”,“cf”:“1.000”}]”  
assign myDt = JsonConvert.DeserializeObject(of datatable)(strJson)

Thank you

---

<div class="post-metadata">

**Author:** ![Tex\_Willer](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/tex_willer/32/104707_2.png) [@Tex\_Willer](https://forum.uipath.com/u/Tex_Willer)\
**Post date:** [Avril 8, 2020, 12:27 UTC](https://forum.uipath.com/t/how-to-deserialize-json-array/210098/4 "2020-04-08T12:27:04Z")

</div>

Wow, that’s a very elegant solution and it worked great. Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [Avril 11, 2020, 12:27 UTC](https://forum.uipath.com/t/how-to-deserialize-json-array/210098/5 "2020-04-11T12:27:04Z")

</div>

A fermé ce sujet (le Avril 11, 2020, 12:27 UTC)

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
