Skip to content

How can you get the top level keys returned? #30

@chicks-net

Description

@chicks-net

I want to get the top-level keys from a TOML file and I've tried:

toml get ./characters.toml 'keys'

but it returns nothing. While if I put this into jq after toml.....

% toml get ./characters.toml '.' | jq 'keys'
[
  "Bea",
  "Duo",
  "Eddy",
  "Falstaff",
  "Junior",
  "Lily",
  "Lin",
  "Lucy",
  "Oscar",
  "Vikram",
  "Zari"
]

So,

  • Does anybody know why toml does not support keys?
  • Is there any way to do this without jq? (I'm a bit 😦 that we need jq to parse TOML.)
  • Is there any documentation reference for what query syntax this tool supports?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions