Displays JSON files in a flat format.
dotnet tool install -g catj
catj [file]
OR
cat [file] | catj
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"
A special thanks to Soheil Rashidi for the idea (https://github.com/soheilpro/catj).