# Parsing issues

**URL:** <https://discuss.elastic.co/t/parsing-issues/291159>\
**Category:** Logstash\
**Created:** [December 7, 2021, 8:00pm UTC](https://discuss.elastic.co/t/parsing-issues/291159 "2021-12-07T20:00:15Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [December 7, 2021, 8:28pm UTC](https://discuss.elastic.co/t/parsing-issues/291159/2 "2021-12-07T20:28:45Z")

</div>

> [@nickel43](#):
>
> What I want the output to be in Kibana is 1 hit for each track with all the above fields (artist name etc.)

The first thing to do would be

```
split { field => "playlists" }
split { field => "[playlists][tracks]" }

```

at that point you will have one event for each track and I think each one will look like this (AWS US East is down this afternoon, or I would test it)

```
"playlists": {
        "name": "Rock", 
        "collaborative": "false", 
        "pid": 0, 
        "modified_at": 1493424000, 
        "num_tracks": 22, 
        "num_albums": 27, 
        "num_followers": 1, 
        "tracks": {
                "pos": 0, 
                "artist_name": "Michael Jackson", 
                "track_uri": "spotify:track:0UaMYEvWZi0ZqiDOoHU3YI", 
                "artist_uri": "spotify:d5F5d7go1WT98tk", 
                "track_name": "Song", 
                "album_uri": "spotify:album:6vV5Udzzf4Qo2I9K", 
                "duration_ms": 226863, 
                "album_name": "The Cookbook"
            }, 
            "num_edits": 34, 
            "duration_ms": 9065801, 
            "num_artists": 37
        },

```

So then you can

```
mutate {
    rename => {
        "[playlists][tracks]" => "track"
        "[playlists][name]" => "[playlist][name]"
        "[playlists][pid]" => "[playlist][pid]"
    }
    remove_field => "playlists"
}

```

If you want the fields inside [track] to be at the top level use a ruby filter like [this](https://discuss.elastic.co/t/how-to-dynamically-move-nested-key-value-to-root-level/180006/2).

---

_[View the full topic](https://discuss.elastic.co/t/parsing-issues/291159)._
