JSONPathValue
This function allows you to query a web service response to find and return a single value based on the provided JSON path.
Syntax
JSONPathValue(textValue, path)
Enabled For
For a description of the business object categories, see Notes on "Enabled For".
| Business Object Category | Yes/No | 
|---|---|
| Business Rules: Before-Save Rules | Yes | 
| Business Rules: Calculation Rules (After Save, with or without Also Recalculate on Load) | Yes1 | 
| Business Rules: Calculation Rules (Before Save or Always, without Also Recalculate On Load) | Yes | 
| Business Rules: Calculation Rules (Before Save or Always, with Recalculate On Load) | Yes1 | 
| Business Rules: Editing Rules | Yes2 | 
| Business Rules: Initialization Rules | Yes | 
| Business Rules: Read Only Rules | No | 
| Business Rules: Required Rules | Yes2 | 
| Business Rules: Validation Rules | Yes | 
| Client Expressions | No | 
| Object Permissions | No | 
| Services | No | 
| LDAP | No | 
| Mobile | No | 
| Quick Actions (except UI Quick Actions) | Yes | 
| UI Quick Actions | No | 
| Reports | Yes | 
| Search/Dashboard without field references | No | 
| Search/Dashboard with field references | No | 
                                                        
  | 
                                                |
Parameters
| Parameter | Description | 
|---|---|
| textValue | Input JSON document | 
| 
                                                         path  | 
                                                    
                                                         JSON path  | 
                                                
Return Value
Returns a single value based on the provided JSON path.
Example
$(JSONPathValue('{
"store": {
"book": [
{
"author":"Nigel Rees",
"category":"reference",
"price":8.95
"title":"Sayings of the Century",
},
{
"author":"Evelyn Waugh",
"category":"fiction",
"price":12.99
"title":"Sword of Honour",
},
{
"author":"Herman Melville",
"category":"fiction",
"isbn":"0-553-21311-3",
"price":8.99
"title":"Moby Dick",
},
{
"author":"J. R. R. Tolkien",
"category":"fiction",
"isbn":"0-395-19395-8",
"price":22.99
"title":"The Lord of the Rings",
},
]
}
}', "$.store.book[?(@.author=~/Melville$/)]"))
Returns:
{
"author": "Herman Melville",
"category": "fiction",
"isbn": "0-553-21311-3",
"price": 8.99,
"title": "Moby Dick"
}