# JSON Split

**URL:** https://discuss.elastic.co/t/json-split/282642
**Category:** Logstash
**Created:** [August 27, 2021, 8:45am UTC](https://discuss.elastic.co/t/json-split/282642 "2021-08-27T08:45:09Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![shashikant.deshmukh](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@shashikant.deshmukh](https://discuss.elastic.co/u/shashikant.deshmukh)
#### Post date: [August 27, 2021, 8:45am UTC](https://discuss.elastic.co/t/json-split/282642/1 "2021-08-27T08:45:09Z")

</div>

Hi,

below is my Json, can you please help to split, I want all details from "Value" as separate event in elasticsearch.

```auto
{
    "@odata.context": "https://urlrequired/api/$metadata#Robots",
    "@odata.count": 116,
    "value": [
        {
            "LicenseKey": null,
            "MachineName": "NLUIPACN019",
            "MachineId": 4,
            "Name": "Goal_Robo1",
            "Username": "ww123\\A7XXXX",
            "Description": "ZerXXXRobo1",
            "Version": "19.10.1.0",
            "Type": "Unattended",
            "HostingType": "Standard",
            "Password": null,
            "CredentialType": null,
            "RobotEnvironments": "_Env",
            "Id": 23,
            "ExecutionSettings": null
        },
        {
            "LicenseKey": null,
            "MachineName": "XXXXXX019",
            "MachineId": 4,
            "Name": "Goal_Robo2",
            "Username": "ww930\\A702288",
            "Description": "ZerXX_robo2",
            "Version": "19.10.1.0",
            "Type": "Unattended",
            "HostingType": "Standard",
            "Password": null,
            "CredentialType": null,
            "RobotEnvironments": "XXXXXo_Env",
            "Id": 24,
            "ExecutionSettings": null
        },
        {
            "LicenseKey": null,
            "MachineName": "XXXXXXX019",
            "MachineId": 4,
            "Name": "Goal_Robo4",
            "Username": "ww123\\A702XXX1",
            "Description": "ZerXXXobo4",
            "Version": "19.10.1.0",
            "Type": "Unattended",
            "HostingType": "Standard",
            "Password": null,
            "CredentialType": null,
            "RobotEnvironments": "XXXXRbo_Env",
            "Id": 25,
            "ExecutionSettings": null
        },
        {
            "LicenseKey": null,
            "MachineName": "XXXXXX019",
            "MachineId": 4,
            "Name": "DDDDobo3",
            "Username": "ww212\\A7XXXX",
            "Description": "XXXXrobo3",
            "Version": "19.10.1.0",
            "Type": "Unattended",
            "HostingType": "Standard",
            "Password": null,
            "CredentialType": null,
            "RobotEnvironments": "XXXXXbo_Env",
            "Id": 26,
            "ExecutionSettings": null
        },
        {
            "LicenseKey": null,
            "MachineName": "XXXXXX019",
            "MachineId": 4,
            "Name": "Goal_Robo5",
            "Username": "ww878\\A70SSSS2",
            "Description": "ZXXXXXbo5",
            "Version": "19.10.1.0",
            "Type": "Unattended",
            "HostingType": "Standard",
            "Password": null,
            "CredentialType": null,
            "RobotEnvironments": "DDDDD_Robo_Env",
            "Id": 27,
            "ExecutionSettings": null
        },
        {
            "LicenseKey": null,
            "MachineName": "NXXXXXX19",
            "MachineId": 4,
            "Name": "GOAL_RMG_Robo1",
            "Username": "wwyt0\\A703471",
            "Description": "DFGGRMG_Robo1",
            "Version": "19.10.1.0",
            "Type": "NonProduction",
            "HostingType": "Standard",
            "Password": null,
            "CredentialType": null,
            "RobotEnvironments": "Robo_Env",
            "Id": 31,
            "ExecutionSettings": null
        },
        {
            "LicenseKey": null,
            "MachineName": "NLUIXXXXX019",
            "MachineId": 4,
            "Name": "GOAL_RMG_Robo2",
            "Username": "ww121\\AASA77",
            "Description": "GOALbo2",
            "Version": "19.10.1.0",
            "Type": "NonProduction",
            "HostingType": "Standard",
            "Password": null,
            "CredentialType": null,
            "RobotEnvironments": "GXXXXX_Env",
            "Id": 33,
            "ExecutionSettings": null
        },
        {
            "LicenseKey": null,
            "MachineName": "NLUASASS019",
            "MachineId": 4,
            "Name": "Goal_Robo6",
            "Username": "wx121\\A7WWE59",
            "Description": null,
            "Version": "19.10.1.0",
            "Type": "NonProduction",
            "HostingType": "Standard",
            "Password": null,
            "CredentialType": null,
            "RobotEnvironments": "GxxxxRobo_Env",
            "Id": 142,
            "ExecutionSettings": null
        },
        {
            "LicenseKey": null,
            "MachineName": "Nxxxxx019",
            "MachineId": 4,
            "Name": "GXXXXXmrise1",
            "Username": "wwasss\\AXXX10",
            "Description": "Create/Delete/Scul",
            "Version": "19.10.1.0",
            "Type": "NonProduction",
            "HostingType": "Standard",
            "Password": null,
            "CredentialType": null,
            "RobotEnvironments": "GO_Env",
            "Id": 143,
            "ExecutionSettings": null
        },
        {
            "LicenseKey": null,
            "MachineName": "NLUISSSSSSS",
            "MachineId": 4,
            "Name": "GOAL_SAAAAise2",
            "Username": "wwqwq\\A7XXX8",
            "Description": "Change",
            "Version": "19.10.1.0",
            "Type": "NonProduction",
            "HostingType": "Standard",
            "Password": null,
            "CredentialType": null,
            "RobotEnvironments": "GSsSS_Env",
            "Id": 144,
            "ExecutionSettings": null
        }
    ]
}

```

below is my config

```auto
input {
 file {
   	start_position => "beginning"
   	path => "C:/ELK/logstash/logstash/bin/JsonData.log"
}
}
filter {
 json { source =>"message"
      }
split {
	field => "[value]"
	}
mutate {
	remove_field => ["message","@timestamp","path","host"]
}
}
output {
	elasticsearch
	{
	 	hosts => "http://localhost:9200"
	 	index => "demo-json-split"
	}
stdout{}
}

```

Thanks in advance!!

---

<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: [August 30, 2021, 12:45am UTC](https://discuss.elastic.co/t/json-split/282642/2 "2021-08-30T00:45:35Z")

</div>

The split filter should be splitting the event into 10 events, each having a [value] field containing one of the entries from the array. Are you getting 10 events in elasticsearch. If so what do you not like about those events?

---

<div class="post-metadata">

### Author: ![shashikant.deshmukh](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@shashikant.deshmukh](https://discuss.elastic.co/u/shashikant.deshmukh)
#### Post date: [August 30, 2021, 4:40am UTC](https://discuss.elastic.co/t/json-split/282642/3 "2021-08-30T04:40:29Z")

</div>

@Badger,

Thanks for your response, after execution of config I stuck on below screen.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/2/42f94ee2f2df5fe51b9b1f936dbb3bea7d7cffe2.png)

---

<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: [August 30, 2021, 11:47am UTC](https://discuss.elastic.co/t/json-split/282642/4 "2021-08-30T11:47:21Z")

</div>

There is no error there, what makes you think you have a problem?

---

<div class="post-metadata">

### Author: ![shashikant.deshmukh](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@shashikant.deshmukh](https://discuss.elastic.co/u/shashikant.deshmukh)
#### Post date: [August 30, 2021, 12:03pm UTC](https://discuss.elastic.co/t/json-split/282642/5 "2021-08-30T12:03:46Z")

</div>

It's very difficult to understand for me why execution stuck on above screen almost (1 hour on same screen). I will check on different environment and will come back to you..

---

<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: [September 27, 2021, 12:04pm UTC](https://discuss.elastic.co/t/json-split/282642/6 "2021-09-27T12:04:23Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
