Forum Discussion

aditya_gupta41's avatar
aditya_gupta41
Contributor
2 years ago

Extracting value based on key field

Hello Experts,

Below is the Input schema for my data:

My objective is to extract value of ntgr where value of key = 'xyz'

Thanks in Advance

1 Reply

  • Hi  aditya_gupta41 

    If I understand you just need the value  of the key "ntgr" if its 'xyz' ? 
    Then I would recommend that you get a filter snap and put expression enabled inside the snap and drag and drop the path until 'ntgr' and put next to it : == 'xyz'.

    So after the expression you only get the result with that value and you could put a mapper snap next to it to only get that value.

    Another option to acquire this is to use mapper snap and drag and drop the path until 'ntgr' and type next to it : == 'xyz' ? $theValue : null
    and as target path the name how you want: for example $value

    This will show in the result: $value: 'xyz' or if it's not 'xyz' , $value: null

    Hope this helps

    Jens