So, i'm new in storage systems in godot, and for now i made a testing json database to save only 3 variables, a name, a cost, and a image path. Think of it as cards. Well, my problem is that when i get the godot dictionary with all of the info, I don't know how to search in between keys:
*{
"sheets": [
{
"name": "cards",
"columns": [
{
"typeStr": "1",
"name": "NOMBRE"
},
{
"typeStr": "3",
"name": "COSTE",
"opt": true,
"display": null
},
{
"typeStr": "1",
"name": "RUTAIMAGEN",
"display": null
}
],
"lines": [
{
"NOMBRE": "Ataque",
"RUTAIMAGEN": "res://resources/images/sword.png",
"COSTE": 3
},
{
"NOMBRE": "Defensa",
"RUTAIMAGEN": "res://resources/images/shield.png",
"COSTE": 5
},
{
"NOMBRE": "Vida",
"RUTAIMAGEN": "res://resources/images/heal.png",
"COSTE": 1
}
],
"separators": [],
"props": {}
}
],
"customTypes": [],
"compress": false
}*
This file was made in CastleDB, but I can't manage to get into the "lines" key inside of the "sheets" key. I search on the docs and it isn't there i opened an issue for clarification.
TL;DR How to get a key inside of another key in a dictionary.
- I have a "sheets" key with another key inside of it called "lines" and "columns". And inside of "lines" I have 3 arrays with another 3 values. So I don't know how data.get("sheets"/"lines"/"1..2..3/name"). I know this does not work but I don't know how to make it properly.