sfw_search_array_node

Description

Retrieve node from Json Object

Since: 1.0.0

Code

<?php function sfw_search_array_node( $objects, $property, $needle, $return = 'FIRST_RESULT' ){ 
	 … 
 } ?>

Parameter

$objects
(array) - an array of objects
$property
(string) - a property name
$needle
(string|array) - a possible value or an array of values
$return
(string) - 'FIRST_RESULT' for a single result or 'ARRAY' for possible multiple results

Default: 'FIRST_RESULT'

Return

(array|false|mixed) Returns the node or false if no node was found. Returns array depending on $return param

File

core/utils.php