Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.
This repository was archived by the owner on Oct 14, 2020. It is now read-only.

Lost for how to include #48

@theDanielJLewis

Description

@theDanielJLewis

Please treat me like I know almost nothing about Composer.

How do I actually get JSONPath into my project? After running composer require flow/jsonpath dev-master or composer require flow/jsonpath, my PHP looks essentially like this:

<?php
require (__DIR__ . '/vendor/autoload.php');

$data = ['people' => [['name' => 'Joe'], ['name' => 'Jane'], ['name' => 'John']]];
$result = (new JSONPath($data))->find('$.people.*.name'); // returns new JSONPath

But I get the error "Class 'JSONPath' not found."

I'm doing something wrong, but I don't know what.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions