Formula to read value from json

json
studio

#1

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”
}
}
]
}]

}


#2

https://docs.microsoft.com/en-us/dotnet/visual-basic/developing-apps/programming/drives-directories-files/how-to-read-from-text-files

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


#3

Follow the available solved thread on the forum please:

Regards…!!
Aksh


#4

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


#5

thank you all :slight_smile: