cancel
Showing results for 
Search instead for 
Did you mean: 

Map XML attribute to a field

Sahil
Contributor

Hi,
I need to map “id” and “header” field in mapper.
Data.txt (785 Bytes)

I am using file reader snap,xml parser and mapper.
in mapper, tried different expressions but not able to get the fields.
File is attached, Any suggestions!

1 ACCEPTED SOLUTION

marjan_karafilo
Contributor

Hi @Sahil ,

With this expression in mapper, you can get the IDs:
image

With this expression in mapper, you can get the Headers:
image

Let me know if this helps you.

BR,
Marjan

View solution in original post

4 REPLIES 4

marjan_karafilo
Contributor

Hi @Sahil ,

With this expression in mapper, you can get the IDs:
image

With this expression in mapper, you can get the Headers:
image

Let me know if this helps you.

BR,
Marjan

I am getting Array of ‘id’ and ‘header’. I need this to join with another set of array containing ‘id’. How do I do that? thanks!

Hi @Sahil ,

You can use JSON Splitter in order to split the array and then perform a Join with the other array.

Also, it is recommended to use the Sort snap before joining the data.

BR,
Marjan

i tried json splitter but I am not sure of the json path for both id and header.