Table Of Contents
- Use case
- Guide
- Video guide
Use case
What happens many times is that there is a heap of information, of which, a majority portion is not required. The Key Filter transformer plays a key role in eliminating the chaos by filtering out the irrelevant keys.
Guide
Here’s how you can implement the transformer.
Step 1: Click on Add Data Transformer and select the Key Filter transformer.
Step 2: Select Key Accessor under Accessor.
Step 3: Type in the irrelevant keys that are not required in the Keys field.
Voila! The mentioned keys will be removed (or filtered) from the object.
The best part is that you can utilize the transformer to eliminate keys using conditions or no conditions at all.
Here is the step-by-step guide to do it.
Step 1: Click on Add Data Transformer and select the Key Filter transformer.
Step 2: Select Key Accessor under Accessor.
Step 3: Instead of selecting keys from Add Keys, you have to click on Add Conditions and select a condition. For example, you can select Value one of list.
Step 4: Next, you have to click on Add Value and specify the value. Let’s suppose you add the value String and specify its value.
Step 5: On clicking the Run Test button, you will see that the transformer has removed the string from the object.