# Parsing a JSON array of objects with field-value

**URL:** <https://discuss.elastic.co/t/parsing-a-json-array-of-objects-with-field-value/99656>\
**Category:** Logstash\
**Created:** [September 7, 2017, 3:23am UTC](https://discuss.elastic.co/t/parsing-a-json-array-of-objects-with-field-value/99656 "2017-09-07T03:23:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tatdat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tatdat/32/113160_2.png) [@tatdat](https://discuss.elastic.co/u/tatdat)\
**Post date:** [September 7, 2017, 3:23am UTC](https://discuss.elastic.co/t/parsing-a-json-array-of-objects-with-field-value/99656/1 "2017-09-07T03:23:15Z")

</div>

I have some log look like

```
{
	"ExtendedProperties": [
		{
			"Value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393",
			"Name": "UserAgent"
		},
		{
			"Value": "65",
			"Name": "UserAuthenticationMethod"
		},
		{
			"Value": "OAuth2:Authorize",
			"Name": "RequestType"
		},
		{
			"Value": "Success",
			"Name": "ResultStatusDetail"
		},
		{
			"Value": "False",
			"Name": "KeepMeSignedIn"
		}
	]
}

```

I used split filter like this

```
if [o365-azure] {
      split {
        field => "[o365][ExtendedProperties]"
      }
    }

```

But i got data one of element in array only llike this

```
"ExtendedProperties": {
        "Value": "Success",
        "Name": "ResultStatusDetail"
      }

```

I want data after filter success look like

```
"ExtendedProperties": {
      "UserAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393",
      "UserAuthenticationMethod": "65",
      "RequestType": "OAuth2:Authorize",
      "ResultStatusDetail": "Success",
      "KeepMeSignedIn": "False"
}

```

How can do it? Thanks !

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [September 7, 2017, 5:37am UTC](https://discuss.elastic.co/t/parsing-a-json-array-of-objects-with-field-value/99656/2 "2017-09-07T05:37:41Z")

</div>

You'll have to use a ruby filter. Similar things have been discussed here in the past month so you should be able to find examples in the archives.

---

<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:** [October 5, 2017, 5:37am UTC](https://discuss.elastic.co/t/parsing-a-json-array-of-objects-with-field-value/99656/3 "2017-10-05T05:37:47Z")

</div>

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