Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 27, 2024 via composer

mtdowling/jmespath.php 2.7.0

Declaratively specify how to extract elements from a JSON document
Package summary
Share
0
issues
1
license
2
MIT
Package created
27 Nov 2013
Version published
25 Aug 2023
Maintainers
2
Total deps
2
Direct deps
1
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
mtdowling/jmespath.php@2.7.0
symfony/polyfill-mbstring@v1.29.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
β“˜ This is a list of mtdowling/jmespath.php 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
symfony/polyfill-mbstringv1.29.0-MIT
prod

Visualizations

Frequently Asked Questions

What does mtdowling/jmespath.php do?

The mtdowling/jmespath.php is a powerful tool that allows PHP developers to declaratively specify how to extract elements from a JSON document. In simpler terms, it's a way to query JSON documents within your PHP applications, making it ideal for handling, searching, and filtering complex data structures. The package is compliant with PHP versions 7.2.5 and above, and it can be easily installed via Composer.

How do you use mtdowling/jmespath.php?

To use the mtdowling/jmespath.php package, first, you need to install it using Composer, a tool for dependency management in PHP. If you're new to Composer, you'll find its documentation at http://getcomposer.org/doc/00-intro.md. Once installed, you can use the package by requiring the autoload.php file, which is generated by Composer, in your PHP script. After that, use the JmesPath\search function to analyze your JSON data. Here is a simple instance:

require 'vendor/autoload.php';

$expression = 'foo.*.baz';

$data = [
    'foo' => [
        'bar' => ['baz' => 1],
        'bam' => ['baz' => 2],
        'boo' => ['baz' => 3]
    ]
];

$result = JmesPath\search($expression, $data);
// The $result will have [1, 2, 3]

In this given illustration, $expression is the JMESPath expression defining the data you want to extract from the $data array. Note that you can also use JmesPath\Env::search if you require PSR-4 compliance.

Where are the mtdowling/jmespath.php docs?

For comprehensive understanding about mtdowling/jmespath.php usage, please have a look at the official documentation of JMESPath available at http://jmespath.org/tutorial.html. Also, the complete JMESPath specs are available at http://jmespath.org/specification.html#grammar, it gives a detailed overview of the grammar of JMESPath. More PHP specific examples and comprehensive test cases can be found at https://github.com/jmespath/jmespath.php/tree/master/tests/compliance.