Skip to content

mattleibow/catj

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

catj

Build Status Nuget (with prereleases)

Displays JSON files in a flat format.

Install

dotnet tool install -g catj

Usage

catj [file]

OR

cat [file] | catj

Example

Input:

{
  "mappings": {
    "templates": [
      {
        "fields": {
          "mapping": {
            "norms": false,
            "type": "text",
            "fields": {
              "keyword": {
                "ignore_above": 256,
                "type": "keyword"
              }
            }
          }
        }
      }
    ]
  }
}

Output:

.mappings.templates[0].fields.mapping.norms = False
.mappings.templates[0].fields.mapping.type = "text"
.mappings.templates[0].fields.mapping.fields.keyword.ignore_above = 256
.mappings.templates[0].fields.mapping.fields.keyword.type = "keyword"

Demo

Thanks

A special thanks to Soheil Rashidi for the idea (https://github.com/soheilpro/catj).