How to extract array json data to data table

Hi, Anyone help me how to extract below json data
{
“person1”: [
{
“first”: “Nicole”,
“last”: “Adelstein”
}
],
“person2”: [
{
“first”: “Pleuni”,
“last”: “Pennings”
}
],
“person3”: [
{
“first”: “Rori”,
“last”: “Rohlfs”
}
]
}

@Suggala_Tejaswi

Please use deserialize json to first convert this string to jobject…

Then jobj("Person1)(0)("first).ToString will give you the person1 firstname…

Similarly you can get data of other persons using loop on the person number and extract the data

Cheers

1 Like

we will deserialize the JSON - Out: myJObject
grafik

And can convert by:
grafik

Assign Activity:
dtResult =

 JArray.FromObject(myJObject.PropertyValues.select(Function (x) x(0).Value(Of JObject))).toObject(Of DataTable)

POST EDIT:
statement shortening:
grafik

4 Likes

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