Skip to content
Snippets Groups Projects
Commit 4c328b8f authored by Ivan Doroshenko's avatar Ivan Doroshenko Committed by Ivan Doroshenko
Browse files

Issue #3068584 by Matroskeen, jhchnc, gapple, azussman: item_selector failing...

Issue #3068584 by Matroskeen, jhchnc, gapple, azussman: item_selector failing to grab a inner level JSON array
parent 688e576f
No related branches found
No related tags found
No related merge requests found
......@@ -51,7 +51,7 @@ class Json extends DataParserPluginBase implements ContainerFactoryPluginInterfa
// Otherwise, we're using xpath-like selectors.
$selectors = explode('/', trim((string) $this->itemSelector, '/'));
foreach ($selectors as $selector) {
if ((!empty($selector) || $selector === '0') && array_key_exists($selector, $source_data)) {
if (is_array($source_data) && array_key_exists($selector, $source_data)) {
$source_data = $source_data[$selector];
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment