Common Resources - How to Filter without Writing JavaScript

Common resources support path level filtering via JSON Path, which is an alternative to using JavaScript for field-level filtering. As an example, the JSON Path expression below will only return the city for the address object in the array if defaultBilling on that object is true.


Notable differences

A typical JSON Path expression is prefixed with $. However, when using JSON Path on Sugar Integrate, there is no need to prefix the expression.

By default, JSON Path raises an exception when the field cannot be found.  In the example above, an exception would be raised if there was not a city field on the address object. Instead of returning an error, Sugar Integrate will return null, which will be removed from the response by default.

Helpful resources

JSON Path documentation -

JSON Path evaluator -