i've already trying array_key_exists(). But when it should return the expected result, lumen display error message that i need to use another php function instead of array_key_exists() like isset() or property_exists() as mentioned in this question title.
$jsonData = "mydata.json";
$content = file_get_contents($jsonData);
$unsortedData = json_decode($content, true);
//convert array to object
$object = (object) $unsortedData;
$key = $request->input('key');
$keyData = "false";
if(array_key_exists($key, $object))
{
$keyData = "true";
}
// usort($unsortedData, function($a, $b){
// return $a['no'] > $b['no'];
// });
return $keyData;
// var_dump($unsortedData);
so, which one should be used and how to use it? thanks for your help