You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
docuseal/vendor/bundle/ruby/4.0.0/gems/jmespath-1.6.2/bin/jmespath.rb

13 lines
265 B

#!/usr/bin/env ruby
# frozen_string_literal: true
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'jmespath'
require 'json'
expression = ARGV[0]
json = JSON.parse(STDIN.read)
$stdout.puts(JSON.dump(JMESPath.search(expression, json)))