-1

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 :) !

Janu
  • 13
  • 1
  • 3

1 Answers1

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