# Logstash Parse stingyfied json to seperate json fieldsl

**URL:** https://discuss.elastic.co/t/logstash-parse-stingyfied-json-to-seperate-json-fieldsl/327097
**Category:** Logstash
**Created:** [March 6, 2023, 3:13pm UTC](https://discuss.elastic.co/t/logstash-parse-stingyfied-json-to-seperate-json-fieldsl/327097 "2023-03-06T15:13:24Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![PRASHANT\_MEHTA](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prashant_mehta/32/101764_2.png) [@PRASHANT\_MEHTA](https://discuss.elastic.co/u/PRASHANT_MEHTA)
#### Post date: [March 6, 2023, 3:13pm UTC](https://discuss.elastic.co/t/logstash-parse-stingyfied-json-to-seperate-json-fieldsl/327097/1 "2023-03-06T15:13:24Z")

</div>

Hello All,

I've a column in oracle table PACKAGE\_DATA and it has json like string in it and I would like to get every fileds and its value seperate:

PACKAGE\_DATA Column data

```auto
{"status":"READY_FOR_PROCESSING","errorData":null,"creationDate":1678096719969,"lastModificationDate":1678096824967,"manyId":"1900","form":"ABC","systemId":"TIS_FULL","userId":"?","XmlFileId":"","size":0,"Kind":"FULL","Datas":[{"serviceRequestId":"29F91450A3","Counter":2,"size":122628,"fileId":"CC2B5","packageId":"1900","lPart":true},{"sRequestId":"190FBB14E1864A75B6B8ECC054FEAD3A","pCounter":1,"size":122628,"fileId":"F6395CF76A2E","packageId":"1900","lastPart":false}],"Histories":[{"status":"START","errorData":null,"creationDate":1678096719980,"lastModificationDate":1678096719980},{"status":"PROCESSING","errorData":null,"creationDate":1678096824974,"lastModificationDate":1678096824974}]}

```

Expected individual fields in elastic index:  
"status":"READY\_FOR\_PROCESSING",  
"errorData":null,  
"serviceRequestId":"29F91450A3",  
"Counter":2,  
"size":122628,  
"fileId":"CC2B5".............etc

Tried Filters:

1)With this in logs I can see only sql query statement in log ,but data dont come to index

json {  
source =\> "package\_data"  
}

1. 

```auto
filter {
  json {source => "package_data"} 
        split {field => "package_data"}
        mutate {remove_field => ["package_data"]}
}

```

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/3/13a43ebd77cc7c38d855d3b073d4615168c266fa.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/4/84e4d36ce20da214db15fbb646d92ee8f14fde66.jpeg)

How should I parse to get seperated fields to be created?

Template:

```auto
Template

PUT _index_template/tcs-package-details
{
  "template": {
    "settings": {
      "index": {
        "lifecycle": {
          "name": "tcs-policy",
          "rollover_alias": "tcs-package-details"
        },
        "number_of_shards": "1",
        "number_of_replicas": "0"
      }
    },
    "mappings": {
      "_routing": {
        "required": false
      },
      "numeric_detection": false,
      "dynamic_date_formats": [
        "strict_date_optional_time",
        "yyyy/MM/dd HH:mm:ss Z||yyyy/MM/dd Z"
      ],
      "_source": {
        "excludes": [],
        "includes": [],
        "enabled": true
      },
      "dynamic": true,
      "date_detection": true
    }
  },
  "index_patterns": [
    "tcs-package-details-*"
  ],
  "composed_of": []
}

```

Thanx

---

<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: [April 3, 2023, 3:20pm UTC](https://discuss.elastic.co/t/logstash-parse-stingyfied-json-to-seperate-json-fieldsl/327097/3 "2023-04-03T15:20:24Z")

</div>

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