Skip to content

XoMute/Diploma

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Examples:

Json:

{
  "name1": true,
  "name2": [
    1.0,
    2.0,
    3.0
  ],
  "name3": {
    "name4": [
      null,
      "Some timestamp",
      {
        "name5": "Value"
      }
    ]
  }
}

Query:

".name2"

Result:

[
  1.0,
  2.0,
  3.0
]

Query:

".name2[1:3]"

Result:

2.0
3.0

Query:

".name3.name4[1], name3.name4[2].name5"

Result:

"Some timestamp"
"Value"

Json:

[
  {
    "foo": {
      "bar": {
        "buz": 1.0
      }
    }
  },
  {
    "foo": {
      "bar": {
        "buz": 2.0
      }
    }
  },
  {
    "foo": {
      "bar": {
        "buz": 3.0
      }
    }
  }
]

Query:

".[]"

Result:

{
  "foo": {
    "bar": {
      "buz": 1.0
    }
  }
}
{
  "foo": {
    "bar": {
      "buz": 2.0
    }
  }
}
{
  "foo": {
    "bar": {
      "buz": 3.0
    }
  }
}

Query:

".[] | .foo"

Result:

{
  "bar": {
    "buz": 1.0
  }
}
{
  "bar": {
    "buz": 2.0
  }
}
{
  "bar": {
    "buz": 3.0
  }
}

Query:

".[] | .foo | .bar | .buz" or ".[] | .foo.bar.buz"

Result:

1.0
2.0
3.0

Query:

".[] | .foo.bar.buz, .foo.bar"

Result:

1.0
{
  "buz": 1.0
}
2.0
{
  "buz": 2.0
}
3.0
{
  "buz": 3.0
}

Query:

".[] | .foo.bar.buz > 1"

Result:

{
  "foo": {
    "bar": {
      "buz": 2.0
    }
  }
}
{
  "foo": {
    "bar": {
      "buz": 3.0
    }
  }
}

Query:

".[] | .foo.bar.buz > 1.0e0 | .foo.bar.buz, .foo.bar"

Result:

2.0
{
  "buz": 2.0
}
3.0
{
  "buz": 3.0
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages