0

Below is my input.


<a>
    <b>
        <c>one</c>
    </b>
    <b>
        <c>two</c>
    </b>
</a>

And need the following xml output.


<abc>
    <c>one</c>
</abc>

I am trying to implement it as shown below.


`actions:
    - set: output.abc.c
      from: input.a.b
      foreach: input.a.b
      value: $(input.a.b.c.0)`

I am not able to get only the first field of the array. I appreciate your help.

0 Answers0