# Parsing Inner JSON - Array of JSON Objects

**URL:** <https://discuss.elastic.co/t/parsing-inner-json-array-of-json-objects/191601>\
**Category:** Logstash\
**Created:** [July 22, 2019, 8:04am UTC](https://discuss.elastic.co/t/parsing-inner-json-array-of-json-objects/191601 "2019-07-22T08:04:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shivkumar](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@shivkumar](https://discuss.elastic.co/u/shivkumar)\
**Post date:** [July 22, 2019, 8:04am UTC](https://discuss.elastic.co/t/parsing-inner-json-array-of-json-objects/191601/1 "2019-07-22T08:04:46Z")

</div>

The following is the content of my JSON. I am trying to parse the nested JSON.  
I tried to use the `Split` filter for the same but I am facing the error.

```
{
"School": {
	"Details": [{
		"Name": "a",
		"Class": "1"
	}, {
		"Name": "b",
		"Class": "2"
	}, {
		"Name": "c",
		"Class": "3"
	}, {
		"Name": "d",
		"Class": "4"
	}]
}

```

}

Logstash Configuration

```
input {

file {

	path => "/home/user/Desktop/custom_log.txt"
	start_position => beginning
	ignore_older => 0
	codec => "json"
}

```

}

filter {  
split {  
field =\> "Details"  
}  
}

output {

```
stdout {
	codec => rubydebug
}

```

}

Error :  
LogStash::ConfigurationError: Only String and Array types are splittable. field:Details is of type = NilClass

---

<div class="post-metadata">

**Author:** ![thekm1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thekm1/32/35926_2.png) [@thekm1](https://discuss.elastic.co/u/thekm1)\
**Post date:** [July 22, 2019, 8:31am UTC](https://discuss.elastic.co/t/parsing-inner-json-array-of-json-objects/191601/2 "2019-07-22T08:31:34Z")

</div>

Hi @shivkumar  
I am not pretty sure, but shouldn't you give the field "Details" as School['Details'] ?

---

<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:** [July 22, 2019, 11:57am UTC](https://discuss.elastic.co/t/parsing-inner-json-array-of-json-objects/191601/3 "2019-07-22T11:57:07Z")

</div>

Use

```
split { field => "[School][Details]" }
```

---

<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:** [August 19, 2019, 11:57am UTC](https://discuss.elastic.co/t/parsing-inner-json-array-of-json-objects/191601/4 "2019-08-19T11:57:18Z")

</div>

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