I have a JSON file that describes my characters.
I have a character select screen and it loads the JSON data to feed the interface and allow you to cycle through the characters.
I want to be able to say, only show characters with X attributes and Y attributes.
So I have a function like so:
func loadCharacters(X, Y):
var file = File.new()
var text = file.get_as_text()
#get how many are in results
# print something from the dictionary for testing.
So that all works as a base test which is fine. The print shows the contents of the third character.
How can I get ONLY characters that have X and Y that's being passed to the function? I have ALL the character's info in the
dict but I want to now parse that or extract from there based on X and Y.
Any advice much appreciated.