Closed antonMilukov closed 1 year ago
Hi, thanks for pointing that out. Are you able to add a failing test case? If so, add it as a case in \JsonMachineTest\ParserTest::data_testSyntax
. Thanks.
Hi @antonMilukov, does #83 solve your problem?
Can this be closed, @antonMilukov ?
Closing for now. Feel free to comment if the problem persists.
Hello! I have a problem to using wildcard pointer
/results/-/color
like in example from root documentation: as result I receive only 1st iteration and second is not available through theforeach
oriterator
$fruits = Items::fromFile('fruitsArray.json', ['pointer' => '/results/-/color']);
$json = '{"results":[{"name":"apple","color":"red"},{"name":"pear","color":"yellow"},{"name":"some","color":"green"}]}'; $fruits = Items::fromString($json, ['pointer' => "/results/-/color"]);
var_dump(iterator_count($fruits->getIterator())); // result 1
foreach ($fruits as $key => $value) { echo "{$value}\n"; // result only red }