Finding first attribute matching criteria


About this guide

The configuration DSL supports wildcards to remove the dependency of finding and specifying location/index of the item in the list/array. In this guide, you will learn how to work with wildcards in Demyst's proprietary DSL.

You will need to create an API before you can edit the config to use the indexing operator.

JSON Syntax

  • The symbol * included in the indexing operator
  • indexing operator must be within the right side in a path to an attribute for a connector
# This will match the first item in the array where primary_sic_code_id is not NULL. This can 
# be combined with functions to define a more complex logic
  "refine": {  
  	"sic" : "hosted_infogroup_business_places.results[*].primary_sic_code_id"  

Example scenario

Search products: You may want to pass search results to another provider, and can solve this by specifying which exact result attributes map to which input parameter, courtesy of the indexing operator.

Pre-fill: Selecting a subset of details in an attribute as a custom response. For example, getting essential business registration details from a business profile database. The indexing operator would be useful in specifying the exact result attributes to select.