Convert array of strings to datatable

Hi ,

I have a data which I am retrivng from api in below format -
{“Status”:true,“StatusCode”:200,“Message”:“Get condition successfully”,“NewCondition”:null,“Conditions”:[

{“ConditionNumber”:“E50067009”,“Sheet”:“0001”,“Attribute”:“01642”,“CheckType”:“NEL”,“CheckLevel”:“SET”,“Version”:“M”,“VisibilityScope”:“”,“BusinessSheet”:“01”,“CriteriaName”:“Instrument Category”,“Test”:“=”,“CriteriaValue”:“Investment Fund”,“Underlying”:“N”,“InitialDate”:“0001-01-01”,“EndDate”:“0001-01-01”},

{“ConditionNumber”:“E50067960”,“Sheet”:“0006”,“Attribute”:“01642”,“CheckType”:“NEL”,“CheckLevel”:“SET”,“Version”:“M”,“VisibilityScope”:“S”,“BusinessSheet”:“01”,“CriteriaName”:“Issuer Country”,“Test”:“=”,“CriteriaValue”:“GERMANY”,“Underlying”:“N”,“InitialDate”:“2018-02-21”,“EndDate”:“0001-01-01”},

{“ConditionNumber”:“E50067961”,“Sheet”:“0006”,“Attribute”:“01642”,“CheckType”:“NEL”,“CheckLevel”:“SET”,“Version”:“M”,“VisibilityScope”:“S”,“BusinessSheet”:“01”,“CriteriaName”:“Issuer Type”,“Test”:“=”,“CriteriaValue”:“Sovereign”,“Underlying”:“N”,“InitialDate”:“2018-02-21”,“EndDate”:“0001-01-01”},

{“ConditionNumber”:“E50080774”,“Sheet”:“0007”,“Attribute”:“01642”,“CheckType”:“NEL”,“CheckLevel”:“SET”,“Version”:“M”,“VisibilityScope”:“”,“BusinessSheet”:“01”,“CriteriaName”:“General Collateral Profile”,“Test”:“=”,“CriteriaValue”:“00229”,“Underlying”:“N”,“InitialDate”:“0001-01-01”,“EndDate”:“0001-01-01”}]

I have created datatable with conditionNumber, sheet ,…

Can anyone please let me know how to convert above format to datatable with out converting to JSON

A quick way:

grafik
out- myJobject

You already have a JSON.

So you can simply deserialize it and conver to DT:

declare JObj as JObject
JObj = JObject.Parse(YourJSON)
DT = JObj("Conditions").ToObject(of Datatable)

Cheers