reuben
2 years agoNew Contributor
Expression Library - navigating JSON arrays
I would like to create an expression library that traverses a JSON array, but I am unsure of the syntax as it does not seem to match what I usually use in a pipeline (JSONPath).
Say I have "LateralSize" in one parameter and the following in the second parameter:
[{
"CustomFieldId": "68f40528-4d63-6a70-60d6-0797407c53d7",
"CustomFieldLayoutControlType": 2,
"FieldName": "LateralSize",
"Label": "Lateral Size",
"PickListItems": [
{
"CustomFieldPickListItemID": "28bd8b11-dfd5-f514-a694-320be7078e59",
"Value": "5",
"Order": 1
},
{
"CustomFieldPickListItemID": "2b58d501-5584-bfbb-a622-54778262cf3f",
"Value": "6",
"Order": 2
}
],
"Value": "2b58d501-5584-bfbb-a622-54778262cf3f",
},
{
"CustomFieldId": "09a0e02d-ae97-431e-74b6-4ea9ecdd742d",
"FieldName": "StreetofConnection",
"Label": "Street of Connection",
"Value": "asdf"
}
]
I would like to get the 6 in the value field. Each value of the custom field has a guid. I need to match the actual value in the custom field guid to the CustomFieldPickListItemID.
In other words, I find the guid found in
"Value": "2b58d501-5584-bfbb-a622-54778262cf3f",
and then match it up to the
"CustomFieldPickListItemID": "2b58d501-5584-bfbb-a622-54778262cf3f"
Then, I would like to return what is in the value field in that item - 6.
Any ideas will be appreciated.