<?php $json = '{"2":1}'; $obj = json_decode($json); $arr = get_object_vars($obj); $key = array_key_exists('2', $arr); var_dump($key, $arr);
You have javascript disabled. You will not be able to edit any code.