As per the documentation, you need to specify true as the second argument if you want an associative array instead of an object from json_decode. This would be the code:

$result = json_decode($jsondata, true);

If you want integer keys instead of whatever the property names are:

$result = array_values(json_decode($jsondata, true));

However, with your current decode you just access it as an object:

print_r($obj->Result);
Answer from Stephen on Stack Overflow
๐ŸŒ
PHP
php.net โ€บ manual โ€บ en โ€บ function.json-decode.php
PHP: json_decode - Manual
JSON can be decoded to PHP arrays by using the $associative = true option. Be wary that associative arrays in PHP can be a "list" or "object" when converted to/from JSON, depending on the keys (of absence of them).
๐ŸŒ
W3Schools
w3schools.com โ€บ php โ€บ func_json_decode.asp
PHP json_decode() Function
The json_decode() function is used to decode or convert a JSON object to a PHP object. json_decode(string, assoc, depth, options) Store JSON data in a PHP variable, and then decode it into a PHP associative array: $jsonobj = '{"Peter":35,"B...
๐ŸŒ
ReqBin
reqbin.com โ€บ code โ€บ php โ€บ 0uwqq41y โ€บ json-to-array-php-example
How do I convert JSON to PHP array?
March 27, 2023 - To convert a JSON data string to a PHP array, you can use the json_decode($json) function. The json_decode() function accepts the JSON string as the first parameter and a few additional parameters to control the process of converting JSON to ...
๐ŸŒ
Medium
medium.com โ€บ @jochelle.mendonca โ€บ demystifying-json-and-arrays-in-php-unraveling-the-complexity-c8a1c9d51896
Demystifying JSON and Arrays in PHP: Unraveling the Complexity | Medium
March 6, 2024 - Letโ€™s walk through the nuances of working with PHP arrays and JSON, showing how easily to encode and decode JSON data.
๐ŸŒ
Netlify
json2php.netlify.app
JSON to PHP - json_decode online
We're sorry but JSON to PHP doesn't work properly without JavaScript enabled. Please enable it to continue
๐ŸŒ
CodeSignal
codesignal.com โ€บ learn โ€บ courses โ€บ handling-json-files-with-php โ€บ lessons โ€บ parsing-json-arrays-with-php
Parsing JSON Arrays with PHP
Take a look at the nested employee lists in each department from data.json: Similarly, each department contains another array called employees. To parse this nested structure, we use a nested loop approach, where the outer loop processes the departments and the inner loop traverses through each employee within those departments:
Find elsewhere
๐ŸŒ
W3Schools
w3schools.com โ€บ php โ€บ php_json.asp
PHP and JSON
The json_decode() function returns an object by default. The function has a second parameter, and when set to true, JSON objects are decoded into associative arrays.
๐ŸŒ
Quora
quora.com โ€บ How-do-I-get-values-of-JSON-array-elements-in-PHP
How to get values of JSON array elements in PHP - Quora
Answer: There is no one-size-fits-all answer to this question, as the way you get values of JSON array elements will vary depending on the structure of the JSON array and the language you are using to write your code. However, one way to get values of JSON array elements in PHP is by using the fu...
๐ŸŒ
PHP: json_decode()
parthpatel.net โ€บ home โ€บ php โ€บ php: json_decode() | how to decode json to array in php
PHP: json_decode() | How to decode json to array in PHP | Parth Patel - a Web Developer
September 9, 2021 - When true is passed, JSON object will be converted into associative array; when false is passed, JSON object will be returned as stdClass object; when NULL is passed, it will return associative array or object depending on the JSON_OBJECT_AS_ARRAY ...
๐ŸŒ
SitePoint
sitepoint.com โ€บ php
Encoding/Decoding JSON PHP - PHP - SitePoint Forums | Web Development & Design Community
February 19, 2023 - Can someone please help out here? I have this string in my PHP file and I can not figure out how to parse this. I have tried a million iterations of json_decode and json_encode and stripslashes. I am just trying to access the data for each key value. [{\"car\":\"mazda\",\"color\":\"red\"},{\"car\":\"lincoln\",\"color\":\"black\"}] This is sent to my PHP file so I canโ€™t just type out $myData = โ€˜[{"key":"value"},{"key":"value"}]โ€™ like many of the string examples I have found online.
๐ŸŒ
Reintech
reintech.io โ€บ blog โ€บ php-json-encoding-decoding-web-services
PHP and JSON: Encoding, Decoding, and Web Services | Reintech media
April 28, 2023 - The json_decode() function parses JSON strings into PHP data structures. The second parameter determines whether to return an associative array (true) or a stdClass object (false, default).
๐ŸŒ
W3Docs
w3docs.com โ€บ php
How to JSON Decode a String into an Array with PHP
But, note that since the assoc parameter is set to FALSE, it is necessary to set it to TRUE for retrieving an array. ... <?php $json = '{"a":1,"b":2,"c":3,"d":4,"e":5}'; var_dump(json_decode($json)); var_dump(json_decode($json, true)); ?>
๐ŸŒ
GitHub
gist.github.com โ€บ victorbstan โ€บ 744478
recursively cast a PHP object to array ยท GitHub
In case of complex objects, you will have serious performance issues with json_decode(json_encode()) ... // limit nesting level (for performance and not to go over the maximum) if ( $nestLevel > 15 ) return; // if current member is an object - turn it to an array if( is_object( $obj ) ) $obj = (array) $obj; // if current member is an array - recursively call this function to each of his children if( is_array( $obj ) ) { $return = []; foreach( $obj as $key => $val ) { // correct private and protected key names $aux = explode ( "\0", $key ); $newkey = $aux[ count( $aux ) - 1 ]; $return[ $newkey ] = obj2arr( $val, $nestLevel + 1 ); } } else $return = $obj; // return transformed object return $return;
๐ŸŒ
Some drops of PHP
drops-of-php.hi-folks.dev โ€บ 05-string โ€บ 14-str-json_decode
Decoding a JSON string | Some drops of PHP
The function json_decode() has one mandatory parameter the JSON string and returns the object by default (playing with 2 other optional parameters you can obtain the associative array).
๐ŸŒ
ReqBin
reqbin.com โ€บ code โ€บ php โ€บ zg4d50d8 โ€บ php-json-decode-example
How do I decode JSON in PHP?
July 7, 2023 - To decode a JSON string or file in PHP, you can use the json_decode($json, $assoc, $depth, $options) function. The first parameter specifies the string to be decoded. The second optional parameter sets whether the returned object should be converted ...
๐ŸŒ
Reddit
reddit.com โ€บ r/programmertil โ€บ [php] til sparse arrays are json_encoded into objects instead of arrays
r/ProgrammerTIL on Reddit: [PHP] TIL sparse arrays are json_encoded into objects instead of arrays
August 15, 2016 -

I suppose it is understandable after the fact, but PHP's json_encode will convert any array with non-numeric, non-sequential, non-zero-based keys into a JSON object with the specified keys instead of an array. You can get around it by always using array_values() on your array before encoding it when you can't trust it to be sequential. But it does make for an unhappy front-end when you forget and try to use array methods on an object.