# XML field array question

**URL:** <https://discuss.elastic.co/t/xml-field-array-question/2184>\
**Category:** Logstash\
**Created:** [June 9, 2015, 7:15am UTC](https://discuss.elastic.co/t/xml-field-array-question/2184 "2015-06-09T07:15:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shubhangi\_Gaikwad](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@Shubhangi\_Gaikwad](https://discuss.elastic.co/u/Shubhangi_Gaikwad)\
**Post date:** [June 9, 2015, 7:15am UTC](https://discuss.elastic.co/t/xml-field-array-question/2184/1 "2015-06-09T07:15:46Z")

</div>

XML Source:

"@version": "1",  
"@timestamp": "2015-06-08T11:10:30.296Z",  
"host": "localhost",  
"path": "/mnt/xmlpath/new13.xml",  
"tags": [  
"multiline"  
],  
"response": {  
"statusCode": [  
"200"  
],  
"statusText": [  
"Ok"  
],  
"requestId": [  
"1"  
],  
"data": [  
{  
"testId": [  
"150603\_VD\_9VJ"  
],  
"successfulRVRuns": [  
"1"  
],  
"run": [  
{  
"id": [  
"1"  
],  
"firstView": [  
{  
"tester": [  
"IE9103-192.168.101.93  
"  
],  
"videoFrames": [  
{  
"frame": [  
{  
"time": [  
"0"  
],  
"image": [  
"[http://www.webpagetest.org/getfile.php?test=150603\_VD\_9VJ&video=video\_1&file=frame\_0000.jpg](http://www.webpagetest.org/getfile.php?test=150603_VD_9VJ&video=video_1&file=frame_0000.jpg)"  
],  
"VisuallyComplete": [  
"0"  
]  
},  
{  
"time": [  
"800"  
],  
"image": [  
"[http://www.webpagetest.org/getfile.php?test=150603\_VD\_9VJ&video=video\_1&file=frame\_0008.jpg](http://www.webpagetest.org/getfile.php?test=150603_VD_9VJ&video=video_1&file=frame_0008.jpg)"  
],  
"VisuallyComplete": [  
"49"  
]  
},  
{  
"time": [  
"1600"  
],  
"image": [  
"[http://www.webpagetest.org/getfile.php?test=150603\_VD\_9VJ&video=video\_1&file=frame\_0016.jpg](http://www.webpagetest.org/getfile.php?test=150603_VD_9VJ&video=video_1&file=frame_0016.jpg)"  
],  
"VisuallyComplete": [  
"58"  
]  
},  
{  
"time": [  
"1800"  
],  
"image": [  
"[http://www.webpagetest.org/getfile.php?test=150603\_VD\_9VJ&video=video\_1&file=frame\_0018.jpg](http://www.webpagetest.org/getfile.php?test=150603_VD_9VJ&video=video_1&file=frame_0018.jpg)"  
],  
"VisuallyComplete": [  
"89"  
]  
},  
{  
"time": [  
"5600"  
],  
"image": [  
"[http://www.webpagetest.org/getfile.php?test=150603\_VD\_9VJ&video=video\_1&file=frame\_0056.jpg](http://www.webpagetest.org/getfile.php?test=150603_VD_9VJ&video=video_1&file=frame_0056.jpg)"  
],  
"VisuallyComplete": [  
"99"  
]  
},  
{  
"time": [  
"6400"  
],  
"image": [  
"[http://www.webpagetest.org/getfile.php?test=150603\_VD\_9VJ&video=video\_1&file=frame\_0064.jpg](http://www.webpagetest.org/getfile.php?test=150603_VD_9VJ&video=video_1&file=frame_0064.jpg)"  
],  
"VisuallyComplete": [  
"100"  
]  
},  
]  
}  
]  
}  
],

```
          "repeatView": [
            {
              "tester": [
                "IE9103-192.168.101.93<br>"
              ],
              "videoFrames": [
                {
                  "frame": [
                    {
                      "time": [
                        "0"
                      ],
                      "image": [
                        "http://www.webpagetest.org/getfile.php?test=150603_VD_9VJ&video=video_1_cached&file=frame_0000.jpg"
                      ],
                      "VisuallyComplete": [
                        "0"
                      ]
                    },
                    {
                      "time": [
                        "500"
                      ],
                      "image": [
                        "http://www.webpagetest.org/getfile.php?test=150603_VD_9VJ&video=video_1_cached&file=frame_0005.jpg"
                      ],
                      "VisuallyComplete": [
                        "44"
                      ]
                    },
                    {
                      "time": [
                        "1100"
                      ],
                      "image": [
                        "http://www.webpagetest.org/getfile.php?test=150603_VD_9VJ&video=video_1_cached&file=frame_0011.jpg"
                      ],
                      "VisuallyComplete": [
                        "52"
                      ]
                    },
                    {
                      "time": [
                        "1800"
                      ],
                      "image": [
                        "http://www.webpagetest.org/getfile.php?test=150603_VD_9VJ&video=video_1_cached&file=frame_0018.jpg"
                      ],
                      "VisuallyComplete": [
                        "90"
                      ]
                    },
                    {
                      "time": [
                        "2000"
                      ],
                      "image": [
                        "http://www.webpagetest.org/getfile.php?test=150603_VD_9VJ&video=video_1_cached&file=frame_0020.jpg"
                      ],
                      "VisuallyComplete": [
                        "90"
                      ]
                    },
                    {
                      "time": [
                        "2500"
                      ],
                      "image": [
                        "http://www.webpagetest.org/getfile.php?test=150603_VD_9VJ&video=video_1_cached&file=frame_0025.jpg"
                      ],
                      "VisuallyComplete": [

```

...

config:

mutate {add\_field =\> {  
"time\_fv" =\> "%{[response][data][run][firtsView][videoFrames][0][frame][0][time][0]}"  
}  
}  
mutate {convert =\> ["time\_fv", "float"]}  
}

Expecting output:  
"time\_fv" should hold all values.

How would i config logstash so that added field holds all value coming under \<?time\> ...\<?time\> for both \<?firstView\>& \<?repeatView\>

Any help or suggestions

---

<div class="post-metadata">

**Author:** ![Shubhangi\_Gaikwad](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@Shubhangi\_Gaikwad](https://discuss.elastic.co/u/Shubhangi_Gaikwad)\
**Post date:** [June 9, 2015, 8:34am UTC](https://discuss.elastic.co/t/xml-field-array-question/2184/2 "2015-06-09T08:34:20Z")

</div>

Any help in this regard would be great???

---

<div class="post-metadata">

**Author:** ![Shubhangi\_Gaikwad](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@Shubhangi\_Gaikwad](https://discuss.elastic.co/u/Shubhangi_Gaikwad)\
**Post date:** [June 9, 2015, 11:39am UTC](https://discuss.elastic.co/t/xml-field-array-question/2184/3 "2015-06-09T11:39:42Z")

</div>

Can we do it through logstash

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 5:38am UTC](https://discuss.elastic.co/t/xml-field-array-question/2184/4 "2017-07-06T05:38:03Z")

</div>

Closed on July 6, 2017, 5:38am UTC


