Formula to read value from json

can anyone help , how to read values from below formatted json ? we need to read mappings.name from below.
{
“id”: “123124”,
“MetaID”: “235346”,
“logID”: “23694”,
“data”: [{
“ForcedFIelds”: [{
“label”: “FirstName”,
“Value”: “xyz”,
“Mappings”: {
“name”: “FirstName”,
“datatype”: “String”,
“elementType”: “Input”
}
},
{
“label”: “LastName”,
“Value”: “abc”,
“Mappings”: {
“name”: “LastName”,
“datatype”: “String”,
“elementType”: “Input”
}
}
],
“FIelds”: [{
“label”: “City”,
“Value”: “palakollu”,
“Mappings”: {
“name”: “City”,
“datatype”: “String”,
“elementType”: “Select”
}
},
{
“label”: “StateID”,
“Value”: “NY”,
“Mappings”: {
“name”: “StateID”,
“datatype”: “String”,
“elementType”: “Select”
}
}
]
}]

}

consider your JSON file as text file and use above code to read all text.
Hope it will work.

Follow the available solved thread on the forum please:

Regards…!!
Aksh

2 Likes

Hi Kadari,

You can use the select clause on a JSON array object.
In Below example I am searching one record from the JSON array having CustomerID==102.

Ex. objJsonArray.SelectToken(“$.[?(@.CustomerID==102)]”).ToString()

Thanks,
Asish

thank you all :slight_smile: