I am building my own Json and I was just wondering if you could make a list of Json objects like this "familyList":{} instead of "familyList":[ {}, {}, {}] because in the one with the '{' instead of the usual '[' you can put a key next to the {} like "Mother":{} which will be easier for me to sort through since I will be having a lot of data instead of having to open multiple brackets like this: {}, {}, {}. I am relatively new to JSON so an answer would be greatly appreciated :) !
Asked
Active
Viewed 129 times
1 Answers
0
If i understand you correctly you want something like this:
familyList = {{}, {}, {}};
I do not believe that is valid json. Perhaps, the below is what you are looking for.
familyList = {"Mother": {}, "Father": {} }
Maybe there is something in this link that could help: enter link description here

mamadou jallow
- 351
- 1
- 2
- 10
-
Ye I would like to do something like familyList = {"Mother": {}, "Father": {} }, is that possible? – Janu Feb 14 '21 at 23:29
-