Member since 
    
	
		
		
		04-16-2024
	
	
	
	
	
	
	
	
	
	
	
	
	
	
			
      
                2
            
            
                Posts
            
        
                1
            
            
                Kudos Received
            
        
                1
            
            
                Solution
            
        My Accepted Solutions
| Title | Views | Posted | 
|---|---|---|
| 982 | 04-16-2024 01:52 PM | 
			
    
	
		
		
		04-16-2024
	
		
		01:52 PM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
		
	
				
		
			
					
	
		1 Kudo
		
	
				
		
	
		
					
							 Hello Ma'am,    This recordPath would work-  ../goodIdentifications[*][./goodIdentificationTypeId = "SKU"]/idValue    [*] is used to iterate a list and * is used to refer to all the keys of a map in RecordPath. 
						
					
					... View more
				
			
			
			
			
			
			
			
			
			
		
			
    
	
		
		
		04-16-2024
	
		
		12:59 PM
	
	
	
	
	
	
	
	
	
	
	
	
	
	
		
	
				
		
			
					
				
		
	
		
					
							 The feed json is like below:  [
  {
    "orderId": "10000",
    "orderItems": [
      {
        "orderItemSeqId": "10001",
        "productIdentifications": [
          {
            "productIdentificationTypeId": "SKU",
            "idValue": "98706"
          },
          {
            "productIdentificationTypeId": "UPCA",
            "idValue": "98788"
          },
          {
            "productIdentificationTypeId": "HS_CODE",
            "idValue": "98790"
          }
        ]
      },
      {
        "orderItemSeqId": "10002",
        "productIdentifications": [
          {
            "productIdentificationTypeId": "SKU",
            "idValue": "98690"
          },
          {
            "productIdentificationTypeId": "UPCA",
            "idValue": "98698"
          },
          {
            "productIdentificationTypeId": "HS_CODE",
            "idValue": "98999"
          }
        ]
      }
    ]
  }
]  Requirement- Prepare two new fields for each item of an order.  1. Style: idValue of productIdentification whose productIdentificationTypeId is SKU.  2. UPC: idValue of productIdentification whose productIdentificationTypeId is UPCA.   The output json should be      [
  {
    "orderId": "10000",
    "orderItems": [
      {
        "orderItemSeqId": "10001",
        "productIdentifications": [
          {
            "productIdentificationTypeId": "SKU",
            "idValue": "98706"
          },
          {
            "productIdentificationTypeId": "UPCA",
            "idValue": "98788"
          },
          {
            "productIdentificationTypeId": "HS_CODE",
            "idValue": "98790"
          }
        ],
        "Style": "98706",
        "UPC": "98788"
      },
      {
        "orderItemSeqId": "10002",
        "productIdentifications": [
          {
            "productIdentificationTypeId": "SKU",
            "idValue": "98690"
          },
          {
            "productIdentificationTypeId": "UPCA",
            "idValue": "98698"
          },
          {
            "productIdentificationTypeId": "HS_CODE",
            "idValue": "98999"
          }
        ],
        "Style": "98690",
        "UPC": "98698"
      }
    ]
  }
]     Tried this property in UpdateRecord using RecordPath language but it didn't work.  name: "/orderItems[*]/Style"  value: "/orderItems[*]/goodIdentifications[./goodIdentificationTypeId='SKU']/idValue"    
						
					
					... View more
				
			
			
			
			
			
			
			
			
			
		
		
			
				
						
							Labels:
						
						
		
			
	
					
			
		
	
	
	
	
				
		
	
	
- Labels:
 - 
						
							
		
			Apache NiFi