Im trying to get the value of something in an array someone help

Godot Version

4.3
extends Node2D
var json_path = “res://Assets/Chart/secret-exit-chart.json”
var chart_data: Dictionary = {}
var TimeLost = 0

func _ready():
load_json_file()

var NoteData = chart_data["notes"]

for i in NoteData.size():
	var TimeTillNote = NoteData[i["t"]]

Question

So im trying to get my code to work and it is giving me the error invalid get index ‘t’ (on base: ‘int’). no idea what this means

var TimeTillNote = NoteData[i]["t"]

You want to index the ith index of NoteData, not index i

1 Like

Gives me error invalid index 0 (on base dictionary)

nvm FIXED IT HECK YEAH