`mlr cut` does not appear to handle nested JSON
Author: jauderhoCreated Jul 29, 2022Updated Jul 16, 2026
Labelsfeature-requestplan-written
I have a JSON file with the data below and I'm hoping to extract the value of domain.domain using the command thusly
~/go/bin/mlr --ijson --ocsv cut -f domain.domain *
It would appear that I'm able to extract domain using
~/go/bin/mlr --ijson --ocsv cut -f domain *
I looked through the documentation but most of the documentation seems geared towards manipulating CSV and not JSON. I was unable to find a fragment that could point me in the right direction.
data file
{
"domain": {
"id": "2138514_DOMAIN_COM-VRSN",
"domain": "google.com",
"punycode": "google.com",
"name": "google",
"extension": "com",
"whois_server": "whois.markmonitor.com",
"status": [
"clientdeleteprohibited",
"clienttransferprohibited",
"clientupdateprohibited",
"serverdeleteprohibited",
"servertransferprohibited",
"serverupdateprohibited"
],
"name_servers": [
"ns1.google.com",
"ns2.google.com",
"ns3.google.com",
"ns4.google.com"
],
"created_date": "1997-09-15T04:00:00Z",
"created_date_in_time": "1997-09-15T04:00:00Z",
"updated_date": "2019-09-09T15:39:04Z",
"updated_date_in_time": "2019-09-09T15:39:04Z",
"expiration_date": "2028-09-14T04:00:00Z",
"expiration_date_in_time": "2028-09-14T04:00:00Z"
},
"registrar": {
"id": "292",
"name": "MarkMonitor Inc.",
"phone": "+1.2086851750",
"email": "[email protected]",
"referral_url": "http://www.markmonitor.com"
},
"registrant": {
"organization": "Google LLC",
"province": "CA",
"country": "US",
"email": "select request email form at https://domains.markmonitor.com/whois/google.com"
},
"administrative": {
"organization": "Google LLC",
"province": "CA",
"country": "US",
"email": "select request email form at https://domains.markmonitor.com/whois/google.com"
},
"technical": {
"organization": "Google LLC",
"province": "CA",
"country": "US",
"email": "select request email form at https://domains.markmonitor.com/whois/google.com"
}
}Source: johnkerl/miller