TomOmNom
Member
Hey! I had another problem like this before and the solution completely went over my head so I have another related problem with no knowledge of how to fix it.
I'm trying to access the value
Why is the JSON in this format? because I'm storing a LOT of json here and can't really change the structure.
Here's the code that DOESN'T work
The error returns root[?"default"] as a this string
All help welcome
I'm trying to access the value
"name"
from this JSON but I don't know how to read it.
JSON:
{
"Types": [
{
"name": "Attribute"
}
]
}
Here's the code that DOESN'T work
GML:
var file = file_text_open_read("power_types.json")
var str = file_text_read_string(file)
file_text_close(file)
var root = json_decode(str)
var k = ds_map_find_value(ds_list_find_value(root[?"default"],0),"name")
{
.All help welcome