AES Decrypt Snap - Urgent help
Hello Smart folks, I am having a requirement to AES Decrypt a field(the field was encrypted with ‘AES/CTR/NoPadding’ algo with dynamic Secret key and initialization vector key by external system). Dynamic mean here is my input fields are supposed to be decrypted by different Secret key and Initialization vector in each pipe run so need to pass the keys dynamically in the snap. Tried to decrypt with AES Decrypt snap, but the snap has static property for ‘Secret Key’ and ‘initialization vector key’ which has blocked me to pass these 2 values dynamically from upstream snap or params to decrypt the input data. Any suggestion or any other way to do it in Snaplogic, please help.3.8KViews0likes5CommentsComplex JSONPATH example - extracting values from a deep branch underneath
Here is an example of a very complex json tree and how to extract values from the middle of the tree. If you look at this sample json, we need to extract the TenderType and AuthorizationCode under the Tender Element and also extract the ab1:BeginDateTime where the @EventName": "First Item Time" under ab1:Event . You can see immediately that the both the Tender and SequenceNumber are at different levels under the tree. The following expression will get the authorization code. > jsonPath($, “$RetailTransaction.LineItem[?(@.hasOwnProperty(‘Tender’) == true)].Tender.Authorization.AuthorizationCode”) As you can see, LineItem is an array and within the array, instead of [*], @ gets the current node and we are checking if the current node has Tender Element. If the node has Tender element then get the AuthorizationCode under Authorization. The above is one level nested deep. The following expression will get the BeginDateTime under ab1:Event where the eventname = ‘First Item Time’ > jsonPath($, “$RetailTransaction.LineItem[?(@.hasOwnProperty(‘ab1:TransactionExtensions’) == true)].[‘ab1:TransactionExtensions’][‘ab1:SpeedOfService’][‘ab1:OrderSpeedOfService’][‘ab1:SOSTransaction’][‘ab1:Event’][?(@[‘ab1:EventID’][‘@EventName’]==‘First Item Time’)][‘ab1:BeginDateTime’]”) As you can see, in the LineItem array, first find if the element has ‘ ab1:TransactionExtensions ’ then, go deep unto the ab1:Event array and within that array again first if the eventname equals First Item Time , and then get the element ab1:BeginDateTime I hope this helps in resolving complex JSON PATH expressions. Enclosed is the pipeline too that demonstrates and make use of this. Complex-JsonPath.slp (11.0 KB)873Views0likes0Comments